Skip to content

Commit 06650e7

Browse files
committed
Added major release number workflow
1 parent 705d0d4 commit 06650e7

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,10 @@ executes the tests in `tests/integration.py` (see earlier section) to validate
101101
any files created or edited by the integration test. You might also add a step
102102
to 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.__

0 commit comments

Comments
 (0)