Skip to content

APIGOV-28869 - fix regex #126

APIGOV-28869 - fix regex

APIGOV-28869 - fix regex #126

# This action gets triggered by a closed PR on branch named 'APIGOV-UpdateSDKForRelease'
name: Create tag for release
on:
pull_request:
types:
- closed
jobs:
if_SDK_update_merged:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'APIGOV-UpdateSDKForRelease')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download promotion type artifact
uses: dawidd6/action-download-artifact@v6
with:
name: promotiontype
workflow: fully-automated-release.yml
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}
- name: Get promotion type from artifact
id: promotype
run: |
echo "promotype=$(cat promotiontype.txt)" >> $GITHUB_OUTPUT
- name: Bump tag version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
# by default, this action creates a tag with a 'v' prefix, and bumps the patch version.
# See https://github.com/mathieudutour/github-tag-action to customize these rules.
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}
default_bump: ${{ steps.promotype.outputs.promotype }}
- name: Show the new tag
run: |
echo "previous tag ${{ steps.tag_version.outputs.previous_tag }}
echo "new tag ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
generateReleaseNotes: true