sign and upload binaries

This commit is contained in:
Jonas Leder 2025-09-14 19:56:34 +02:00
commit 013b6e7715
3 changed files with 42 additions and 1 deletions

4
.gitignore vendored
View file

@ -1,3 +1,5 @@
*.pdf
otdr-reporter
otdr-reporter.exe
otdr-reporter.exe
ed25519.key
*.ed25519

View file

@ -12,6 +12,7 @@ build-application:
stage: build
image: techknowlogick/xgo:go-1.23.6@sha256:2b902254c76b4d266588d8968a9c027c3cbe35ef1de6758ce56526f2ae138a9f
parallel: !reference [ .parallel, parallel ]
needs: []
before_script:
- dpkg --add-architecture arm64
- rm /etc/apt/sources.list.d/*
@ -57,3 +58,38 @@ build-application:
paths:
- otdr-reporter-*
expire_in: 1 week
sign-binaries:
stage: release
image: golang:1.25.1-alpine
needs:
- build-application
before_script:
- go install github.com/fynelabs/selfupdate/cmd/selfupdatectl@latest
- echo ${SIGNKEY} > ed25519.key
script:
- |
for filename in otdr-reporter-*; do
~/go/bin/selfupdatectl sign "$filename"
done
artifacts:
paths:
- otdr-reporter-*.ed25519
expire_in: 1 week
only:
- master
upload-binaries:
stage: release
image:
name: quay.io/minio/mc
entrypoint: [ '' ]
before_script:
- mc alias set minio $AWS_S3_ENDPOINT $S3_ACCESS_KEY_ID $S3_SECRET_ACCESS_KEY
script:
- mc cp otdr-reporter-* minio/$AWS_S3_BUCKET/
needs:
- build-application
- sign-binaries
only:
- master

3
ed25519.pem Normal file
View file

@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEApVMbSdFxO/bfCD/OVONH++4GrNnYjXTrSziVvopPqYQ=
-----END PUBLIC KEY-----