icebear0828 commited on
Commit
353ecc2
·
1 Parent(s): b525911

ci: auto-trigger release after bump via workflow_dispatch

Browse files

GITHUB_TOKEN tag pushes don't trigger other workflows (GitHub limitation).
Now the bump workflow explicitly dispatches release.yml after pushing the
tag. Also renamed workflow for clarity and added retry-on-conflict logic.

Files changed (1) hide show
  1. .github/workflows/bump-electron.yml +14 -2
.github/workflows/bump-electron.yml CHANGED
@@ -1,4 +1,4 @@
1
- name: Bump Electron version
2
 
3
  on:
4
  push:
@@ -9,11 +9,12 @@ on:
9
  workflow_dispatch:
10
 
11
  concurrency:
12
- group: bump-electron
13
  cancel-in-progress: false
14
 
15
  permissions:
16
  contents: write
 
17
 
18
  jobs:
19
  bump:
@@ -47,6 +48,7 @@ jobs:
47
  echo "last_tag=$LAST_TAG" >> "$GITHUB_OUTPUT"
48
 
49
  - name: Bump version + tag
 
50
  if: steps.check.outputs.skip != 'true'
51
  run: |
52
  git config user.name "github-actions[bot]"
@@ -83,6 +85,7 @@ jobs:
83
  for i in 1 2 3; do
84
  if git push origin master --follow-tags; then
85
  echo "Bumped to $NEW_VERSION, tagged $NEW_TAG"
 
86
  exit 0
87
  fi
88
  echo "Push failed (attempt $i/3), rebasing and retrying..."
@@ -93,3 +96,12 @@ jobs:
93
  done
94
  echo "::error::Push failed after 3 attempts"
95
  exit 1
 
 
 
 
 
 
 
 
 
 
1
+ name: Bump version + release
2
 
3
  on:
4
  push:
 
9
  workflow_dispatch:
10
 
11
  concurrency:
12
+ group: bump-version
13
  cancel-in-progress: false
14
 
15
  permissions:
16
  contents: write
17
+ actions: write
18
 
19
  jobs:
20
  bump:
 
48
  echo "last_tag=$LAST_TAG" >> "$GITHUB_OUTPUT"
49
 
50
  - name: Bump version + tag
51
+ id: bump
52
  if: steps.check.outputs.skip != 'true'
53
  run: |
54
  git config user.name "github-actions[bot]"
 
85
  for i in 1 2 3; do
86
  if git push origin master --follow-tags; then
87
  echo "Bumped to $NEW_VERSION, tagged $NEW_TAG"
88
+ echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT"
89
  exit 0
90
  fi
91
  echo "Push failed (attempt $i/3), rebasing and retrying..."
 
96
  done
97
  echo "::error::Push failed after 3 attempts"
98
  exit 1
99
+
100
+ - name: Trigger release workflow
101
+ if: steps.bump.outputs.new_tag
102
+ run: |
103
+ echo "Dispatching release for $NEW_TAG"
104
+ gh workflow run release.yml -f tag="$NEW_TAG"
105
+ env:
106
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107
+ NEW_TAG: ${{ steps.bump.outputs.new_tag }}