Skip to content

Commit

Permalink
chore: remove keep-main-version-branch workflow and enhance tagpr wor…
Browse files Browse the repository at this point in the history
…kflow with major version bumping
  • Loading branch information
MH4GF committed Jan 6, 2025
1 parent f7c4be3 commit 5457ddb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/keep-main-version-branch.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/tagpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,26 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: Songmu/tagpr@3dca11e7c0d68637ee212ddd35acc3d30a7403a4 # v1.5.0
id: run-tagpr
env:
GITHUB_TOKEN: ${{ secrets.MH4GF_PAT }}
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}

bump_major_branch:
if: needs.tagpr.outputs.tagpr-tag != ''
needs: tagpr
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Get major version
run: echo "MAJOR_VERSION=$(echo ${{ needs.tagpr.outputs.tagpr-tag }} | cut -d '.' -f 1)" >> "$GITHUB_ENV"
- name: Push new tag
run: git push --force origin "HEAD:refs/heads/${MAJOR_VERSION}"

0 comments on commit 5457ddb

Please sign in to comment.