Skip to content

Release - Create Release Candidate Branch #2

Release - Create Release Candidate Branch

Release - Create Release Candidate Branch #2

name: Release - Create Release Candidate Branch
# Triggered manually
on:
workflow_dispatch:
permissions:
contents: write
jobs:
create-release-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
ref: release
# It would be easier to create the branch from develop,
# but unfortunately the script that creates the PR's only considers commits added during the action run
- name: Merge latest from develop
run: |
git config --global user.name 'Release Script'
git config --global user.email '[email protected]'
git fetch origin develop
git merge origin/develop
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
- name: Generate changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.ACTION_TOKEN }}
release-count: 0
skip-tag: true
git-push: false
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.ACTION_TOKEN }}
title: ${{ steps.changelog.outputs.tag }} Release Candidate
base: release
branch: release-candidate
body: ${{ steps.changelog.outputs.clean_changelog }}
labels: release-candidate