Skip to content

ci: release ci

ci: release ci #1

Workflow file for this run

name: Release PR Merged
on:
pull_request:
types: [ closed ]
branches:
- dev
jobs:
# Creates a new tag if a release branch is merged
tag-release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version
id: get-version
run: |
VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | cut -d'/' -f 2)
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
with:
toTag: ${{ steps.get-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body: ${{steps.github_release.outputs.changelog}}
tag_name: ${{ steps.get-version.outputs.version }}