Skip to content

Post Release PR Merge #1

Post Release PR Merge

Post Release PR Merge #1

name: Post Release PR Merge
on:
workflow_dispatch:
pull_request:
# Patterns matched against refs/heads
branches:
- 'release/**'
types: [ closed ]
jobs:
release_merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Git - Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.RELEASE_ACCESS_TOKEN }}
- name: Install cz
run: pip install --user -U Commitizen
- name: Record release version
run: |
echo "RELEASE_VERSION=$(cz version --project)" >> $GITHUB_ENV
- name: Tag release
run: |
git tag $RELEASE_VERSION
git push origin $RELEASE_VERSION
- name: Create a Release
uses: elgohr/Github-Release-Action@v4
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
with:
title: Release ${{ env.RELEASE_VERSION }}