Skip to content

1.2.0 into master

1.2.0 into master #8

Workflow file for this run

name: Create tag
on:
pull_request:
types:
- closed
jobs:
create_tag:
if: github.event.pull_request.merged && (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix/'))
runs-on: ubuntu-latest
steps:
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Extract version from branch name (for hotfix branches)
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout source
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Configure Git
run: |
git config user.name "Tpay Auto Commit"
git config user.email [email protected]
- name: Create and push tag
run: |
git tag ${{ env.RELEASE_VERSION }}
git push origin --tags