File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Tag Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ concurrency :
8+ group : release-tag
9+ cancel-in-progress : false
10+
11+ permissions :
12+ contents : write
13+
14+ jobs :
15+ update-tag :
16+ runs-on : ubuntu-latest
17+ if : ${{ !github.event.release.prerelease && !github.event.release.draft }}
18+
19+ steps :
20+ - name : Checkout the release commit
21+ uses : actions/checkout@v4
22+ with :
23+ ref : ${{ github.event.release.tag_name }}
24+ fetch-depth : 1
25+
26+ - name : Configure git identity
27+ run : |
28+ git config user.name "latest github tag bot"
29+ git config user.email "webmaster@csh.rit.edu"
30+
31+ - name : Move "latest" to the release commit
32+ run : |
33+ set -euo pipefail
34+ target_sha="$(git rev-parse "HEAD^{commit}")" # parses tag to git sha hash
35+ echo "Release ${{ github.event.release.tag_name }} -> ${target_sha}"
36+ git tag --force latest "${target_sha}"
37+ git push --force origin refs/tags/latest
You can’t perform that action at this time.
0 commit comments