From 9292a3c89ce92db08726d993ab85973c8fc8f041 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Wed, 30 Mar 2022 15:19:27 +0000 Subject: [PATCH] Sign again tarball in release using GPG (#2140) Co-authored-by: infeo Co-authored-by: overheadhunter --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f56e590c2..ba9c070ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Sign source tarball with key 615D449FE6E6A235 + if: startsWith(github.ref, 'refs/tags/') + run: | + git archive --prefix="cryptomator-${{ github.ref }}/" -o "cryptomator-${{ github.ref }}.tar.gz" ${{ github.ref }} + echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import + echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a "cryptomator-${{ github.ref }}.tar.gz" + env: + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} - name: Draft a release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 @@ -51,6 +60,8 @@ jobs: discussion_category_name: releases token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} generate_release_notes: true + files: | + cryptomator-${{ github.ref }}.tar.gz.asc body: |- :construction: Work in Progress