diff --git a/.gitignore b/.gitignore index 6833d8a..83f02e1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist/ docker-compose-private.yml .vscode .idea +*.gpg diff --git a/.goreleaser.yml b/.goreleaser.yml index ea6fe5d..1f6dca1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,6 @@ +signs: + - artifacts: checksum + builds: - env: - CGO_ENABLED=0 diff --git a/Dockerfile.artifacts b/Dockerfile.artifacts index 33b45b0..d5d3e78 100644 --- a/Dockerfile.artifacts +++ b/Dockerfile.artifacts @@ -3,7 +3,12 @@ FROM goreleaser/goreleaser as build WORKDIR /build ADD . /build -RUN goreleaser --snapshot --skip-publish --rm-dist +RUN apk add -u gnupg + +RUN \ + export GNUPGHOME="$PWD/releaser-gpg" && export GNUPGHOME && mkdir -p "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" && \ + cat reproxy.signing-key.gpg | gpg --batch --allow-secret-key-import --import && \ + goreleaser --snapshot --skip-publish --rm-dist FROM alpine COPY --from=build /build/dist/ /dist/ @@ -12,6 +17,7 @@ RUN \ cp /dist/*.gz /artifacts/ && \ cp /dist/*.zip /artifacts/ && \ cp /dist/*.txt /artifacts/ && \ + cp /dist/*.sig /artifacts/ && \ cp /dist/*.rpm /artifacts/ && \ cp /dist/*.deb /artifacts/ && \ ls -la /artifacts/*