Skip to content

Commit 4120691

Browse files
committed
Add major tagging workflow to release-drafter configuration
1 parent 679d3e1 commit 4120691

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

struct_module/contribs/github/workflows/release-drafter.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,23 @@ structure:
2727
prerelease: false
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
- name: version
31-
id: version
32-
run: |
33-
git pull --tags
34-
echo ${{ steps.release-drafter.outputs.tag_name }}
35-
tag=${{ steps.release-drafter.outputs.tag_name }}
36-
version=${tag#v}
37-
major=${version%%.*}
38-
echo "tag=${tag}" >> $GITHUB_OUTPUT
39-
echo "version=${version}" >> $GITHUB_OUTPUT
40-
echo "major=${major}" >> $GITHUB_OUTPUT
30+
- .github/workflows/major-tagging.yaml:
31+
content: |
32+
name: major-tagging
33+
34+
on:
35+
push:
36+
tags:
37+
- v** # Trigger on every tag push
38+
39+
jobs:
40+
tag:
41+
name: Move major tag
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: phwt/major-tagging-action@v1
4146
42-
- name: force update major tag
43-
run: |
44-
git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
45-
git push origin refs/tags/v${{ steps.version.outputs.major }} -f
4647
- .github/release-drafter.yml:
4748
content: |
4849
name-template: "v$RESOLVED_VERSION"

0 commit comments

Comments
 (0)