From e9f7065395ab0cdc25f3bf7cd6cba52cfdbc385b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Lars=C3=A9n?= Date: Tue, 16 Dec 2025 21:04:16 +0100 Subject: [PATCH 1/2] Prevent re-tagging Re-taging is naughty. For an elaborate explanation of why, see the "On Re-Tagging" section of the git-tag man page. Or just go here: https://git-scm.com/docs/git-tag#_on_re_tagging --- .github/workflows/publish.yaml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3a4946796f..62dd1e3091 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -418,25 +418,8 @@ jobs: env: TAG_NAME: '${{ needs.build-tauri.outputs.channel }}/${{ needs.publish-tauri.outputs.version }}' run: | - function tag_exists() { - git tag --list | grep -q "^$1$" - } - function fetch_tag() { - git fetch origin "refs/tags/$1:refs/tags/$1" - } - function delete_tag() { - git push --delete origin "$1" - } - function create_tag() { - git tag --force "$1" - git push --tags - } - - fetch_tag "$TAG_NAME" || true - if tag_exists "$TAG_NAME"; then - delete_tag "$TAG_NAME" - fi - create_tag "$TAG_NAME" + git tag "$TAG_NAME" + git push --tags - name: Trigger Sentry Cron - Complete if: ${{ github.event_name == 'schedule' }} shell: bash From fcae1f0f7e42dd4153a7274aa3c95773e13619ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Lars=C3=A9n?= Date: Wed, 17 Dec 2025 08:45:13 +0100 Subject: [PATCH 2/2] Notify GitButler API after tagging If the tagging fails, we don't want the build to be published to the website. --- .github/workflows/publish.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 62dd1e3091..77d4f6d5e1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -395,17 +395,6 @@ jobs: source_dir: 'release-s3/' destination_dir: 'releases/${{ needs.build-tauri.outputs.channel }}/${{ env.version }}-${{ github.run_number }}' - # tell our server to update with the version number - - name: Notify GitButler API of new release - shell: bash - run: | - curl 'https://app.gitbutler.com/api/releases' \ - --fail \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'X-Auth-Token: ${{ secrets.BOT_AUTH_TOKEN }}' \ - --data '{"channel":"${{ needs.build-tauri.outputs.channel }}","version":"${{ env.version }}-${{ github.run_number }}","sha":"${{ github.sha }}"}' - create-git-tag: needs: [publish-tauri, build-tauri] runs-on: ubuntu-latest @@ -420,6 +409,18 @@ jobs: run: | git tag "$TAG_NAME" git push --tags + + # tell our server to update with the version number + - name: Notify GitButler API of new release + shell: bash + run: | + curl 'https://app.gitbutler.com/api/releases' \ + --fail \ + --request POST \ + --header 'Content-Type: application/json' \ + --header 'X-Auth-Token: ${{ secrets.BOT_AUTH_TOKEN }}' \ + --data '{"channel":"${{ needs.build-tauri.outputs.channel }}","version":"${{ env.version }}-${{ github.run_number }}","sha":"${{ github.sha }}"}' + - name: Trigger Sentry Cron - Complete if: ${{ github.event_name == 'schedule' }} shell: bash