From 7b8ddbd8d71aff76c217f8740a407f171184ef2a Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 Aug 2021 10:35:01 +0200 Subject: [PATCH 1/5] adjusted release action [ci skip] --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b15ac741b..53cc0b1e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -519,6 +519,8 @@ jobs: with: draft: true fail_on_unmatched_files: true + discussion_category_name: Releases + token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} files: | *.appimage *.zsync From 2fcff5fb176a6182b22b3283ab51c66b0b7e6f9b Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 Aug 2021 10:52:07 +0200 Subject: [PATCH 2/5] strip non-numerical suffix from version number --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53cc0b1e5..9476b21e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,9 @@ name: Installers and Release on: workflow_dispatch: push: - tags: - - '*' + tags: # see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+-*' env: JAVA_VERSION: 16 @@ -80,8 +81,9 @@ jobs: - id: versions run: | if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION_NUM=`echo ${GITHUB_REF##*/} | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/'` echo "::set-output name=versionStr::${GITHUB_REF##*/}" - echo "::set-output name=versionNum::${GITHUB_REF##*/}" + echo "::set-output name=versionNum::${VERSION_NUM}" else echo "::set-output name=versionStr::SNAPSHOT" echo "::set-output name=versionNum::99.0.0" From 32bd84d754027d44bc3364903148b877840baa89 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 Aug 2021 11:23:59 +0200 Subject: [PATCH 3/5] attempt to fix release --- .github/workflows/release.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9476b21e0..2d5466329 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -482,20 +482,12 @@ jobs: release: name: Draft a release on Github runs-on: ubuntu-latest - needs: [linux-appimage,mac-dmg,win-msi] + needs: [metadata,linux-appimage,mac-dmg,win-msi] if: startsWith(github.ref, 'refs/tags/') && github.repository == 'cryptomator/cryptomator' steps: - uses: actions/checkout@v2 - name: Create tarball - run: git archive --prefix="cryptomator-${{ github.ref }}/" -o "cryptomator-${{ github.ref }}.tar.gz" ${{ github.ref }} - #Signature von finalen Artefakten - - name: Sign tarball with key 615D449FE6E6A235 - run: | - 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 }} + run: git archive --prefix="cryptomator-${{ needs.metadata.outputs.versionStr }}/" -o "cryptomator-${{ needs.metadata.outputs.versionStr }}.tar.gz" ${{ github.ref }} - name: Download linux appimage uses: actions/download-artifact@v2 with: @@ -508,14 +500,15 @@ jobs: uses: actions/download-artifact@v2 with: name: win-msi - - - name: Create Detached GPG Signature for all release files with key 615D449FE6E6A235 + - name: Create detached GPG signature for all release files with key 615D449FE6E6A235 run: | echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import - for extension in .appimage .dmg .msi .zsync; do - $FILE=$(ls | grep ${extension}) + for FILE in `find . -name "*.appimage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE} done + env: + GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} - name: Create release draft uses: softprops/action-gh-release@v1 with: From 3e6acb2561fb72cd57fae1aae3a9960777128560 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 Aug 2021 11:53:33 +0200 Subject: [PATCH 4/5] attempt to fix release --- .github/workflows/release.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d5466329..ca963ce63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -241,10 +241,8 @@ jobs: with: name: linux-appimage path: | - cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage - cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage.asc - cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage.zsync - cryptomator-${{ needs.metadata.outputs.versionStr }}-x86_64.AppImage.zsync.asc + cryptomator-*.AppImage + cryptomator-*.AppImage.zsync if-no-files-found: error # @@ -503,9 +501,10 @@ jobs: - name: Create detached GPG signature for all release files with key 615D449FE6E6A235 run: | echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import - for FILE in `find . -name "*.appimage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do + for FILE in `find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE} done + ls -lR env: GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} @@ -513,11 +512,11 @@ jobs: uses: softprops/action-gh-release@v1 with: draft: true - fail_on_unmatched_files: true + fail_on_unmatched_files: false # TODO discussion_category_name: Releases token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} files: | - *.appimage + *.AppImage *.zsync *.asc *.dmg From a6e28ca387d11a3760d962929a16f5ef55b13608 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Fri, 13 Aug 2021 12:13:04 +0200 Subject: [PATCH 5/5] remove debug stuff [ci skip] --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca963ce63..c3e254426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -504,7 +504,6 @@ jobs: for FILE in `find . -name "*.AppImage" -o -name "*.dmg" -o -name "*.msi" -o -name "*.zsync" -o -name "*.tar.gz"`; do echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${FILE} done - ls -lR env: GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} @@ -512,8 +511,8 @@ jobs: uses: softprops/action-gh-release@v1 with: draft: true - fail_on_unmatched_files: false # TODO - discussion_category_name: Releases + fail_on_unmatched_files: true + discussion_category_name: releases token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} files: | *.AppImage