Skip to content

Commit bdd57a3

Browse files
Merge pull request #4 from atlanhq/major-version-tagging
DQ-420 feat(github): add github action to update major version tag to semantic versioned tags
2 parents d8e827a + 9cfc64b commit bdd57a3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update Major Version Tag
2+
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
target:
8+
description: The tag or reference to use
9+
required: true
10+
major_version:
11+
type: choice
12+
description: The major version to update
13+
options:
14+
- v1
15+
16+
jobs:
17+
tag:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Note this update workflow can also be used as a rollback a major version tag
21+
- uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0
24+
- name: Git config
25+
run: |
26+
git config --global user.name 'GitHub Actions'
27+
git config --global user.email 'actions@github.com'
28+
- name: Tag new target
29+
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
30+
- name: Push new tag
31+
run: git push origin ${{ github.event.inputs.major_version }} --force

0 commit comments

Comments
 (0)