Update staging branch #1049
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update staging branch | |
on: | |
workflow_run: | |
workflows: [Test] | |
types: [completed] | |
branches: [main] | |
concurrency: | |
group: update_staging_branch | |
cancel-in-progress: true | |
jobs: | |
update-staging: | |
runs-on: ${{ matrix.os }} | |
name: Update Staging branch | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
concurrency: | |
group: release_version | |
timeout-minutes: 30 | |
strategy: | |
max-parallel: 4 | |
matrix: | |
node: [20] | |
os: [ubuntu-latest] #, windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: ${{ github.event.workflow_run.head_branch }} | |
- name: Install Deps | |
run: | | |
npm ci | |
- name: Setup GIT | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "donmahallem" | |
- name: Version Packages | |
run: npx standard-version | |
- name: Create Release Body | |
id: get-pr-body | |
run: | | |
body=$(npx conventional-changelog -r 1) | |
body="${body//'%'/'%25'}" | |
body="${body//$'\n'/'%0A'}" | |
body="${body//$'\r'/'%0D'}" | |
echo "body=$body" >> $GITHUB_OUTPUT | |
node ./.github/extract-version.cjs | |
- name: Prepare Release | |
uses: peter-evans/[email protected] | |
with: | |
branch: release-staging | |
title: 'chore: stage release ${{ steps.get-pr-body.outputs.version }} [skip ci]' | |
body: ${{ steps.get-pr-body.outputs.body }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
base: main | |
commit-message: 'chore: stage release ${{ steps.get-pr-body.outputs.version }}' | |
reviewers: donmahallem |