File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ update-version-branch :
9+ name : Update version branch
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
13+ steps :
14+ - name : Check out repository
15+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+ with :
17+ # Pass token so that git push is authenticated without needing to rewrite the remote URL manually
18+ token : ${{ github.token }}
19+
20+ - name : Update version branch
21+ shell : bash
22+ env :
23+ RELEASE_TAG : ${{ github.ref_name }}
24+ run : |
25+ set -euo pipefail
26+ MAJOR=$(echo "$RELEASE_TAG" | cut -d. -f1)
27+ VERSION_BRANCH="v${MAJOR}"
28+
29+ git fetch --all --tags
30+ git checkout "$VERSION_BRANCH"
31+ git reset --hard "$RELEASE_TAG"
32+ git push origin "$VERSION_BRANCH" --force-with-lease
You can’t perform that action at this time.
0 commit comments