diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3a4946796f..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 @@ -418,25 +407,20 @@ 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 - } + 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 }}"}' - fetch_tag "$TAG_NAME" || true - if tag_exists "$TAG_NAME"; then - delete_tag "$TAG_NAME" - fi - create_tag "$TAG_NAME" - name: Trigger Sentry Cron - Complete if: ${{ github.event_name == 'schedule' }} shell: bash