Skip to content

Release 5.4.0a2

Release 5.4.0a2 #474

name: Create tag when released is accepted
# This action:
# - Is triggered when a release PR is accepted and merged into a release branch;
# - Get the version number from the tag's name;
# - Create a new tag named according to the version number in the PR;
# - Push the new tag to GitHub.
on:
pull_request:
branches:
- main
- release/**
types: [closed]
jobs:
create-tag:
if: (github.event.pull_request.merged && startsWith(github.head_ref, 'prepare-release/'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.TOKEN }}
- uses: bluwy/substitute-string-action@v1
name: Get Tag
id: get-tag
with:
_input-text: ${{ github.head_ref }}
prepare-release/: ""
- name: Show tag name
run: echo ${{ steps.get-tag.outputs.result }}
- uses: rickstaa/action-create-tag@v1
name: Create and Push Tag
with:
tag: ${{ steps.get-tag.outputs.result }}