Skip to content

Commit 5457ddb

Browse files
committed
chore: remove keep-main-version-branch workflow and enhance tagpr workflow with major version bumping
1 parent f7c4be3 commit 5457ddb

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

.github/workflows/keep-main-version-branch.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/tagpr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,26 @@ jobs:
88
steps:
99
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1010
- uses: Songmu/tagpr@3dca11e7c0d68637ee212ddd35acc3d30a7403a4 # v1.5.0
11+
id: run-tagpr
1112
env:
1213
GITHUB_TOKEN: ${{ secrets.MH4GF_PAT }}
14+
outputs:
15+
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
16+
17+
bump_major_branch:
18+
if: needs.tagpr.outputs.tagpr-tag != ''
19+
needs: tagpr
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 5
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
- name: Git config
27+
run: |
28+
git config user.name "github-actions[bot]"
29+
git config user.email "github-actions[bot]@users.noreply.github.com"
30+
- name: Get major version
31+
run: echo "MAJOR_VERSION=$(echo ${{ needs.tagpr.outputs.tagpr-tag }} | cut -d '.' -f 1)" >> "$GITHUB_ENV"
32+
- name: Push new tag
33+
run: git push --force origin "HEAD:refs/heads/${MAJOR_VERSION}"

0 commit comments

Comments
 (0)