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 : Move Major Release Tag
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ movetag :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Get major version num and update tag
15+ run : |
16+ VERSION=${GITHUB_REF#refs/tags/}
17+ MAJOR=${VERSION%%.*}
18+ git config --global user.name 'YOUR NAME GOES HERE'
19+ git config --global user.email 'USERNAME@users.noreply.github.com'
20+ git tag -fa ${MAJOR} -m "Update major version tag"
21+ git push origin ${MAJOR} --force
22+
23+
Original file line number Diff line number Diff line change @@ -101,4 +101,10 @@ executes the tests in `tests/integration.py` (see earlier section) to validate
101101any files created or edited by the integration test. You might also add a step
102102to the workflow to test that outputs are correct as well.
103103
104+ ### .github/workflows/major-release-num.yml
104105
106+ This workflow maintains a major release tag (e.g., v1 if current release
107+ is v1.x.y). It runs on each release and either creates the tag (if this is the
108+ first release of a new major release number) or moves it if this is a minor
109+ or patch level release. __ IMPORTANT: You must edit this with your name, etc in
110+ the commit and push step.__
You can’t perform that action at this time.
0 commit comments