This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
meta: Update Changelog for 0.2.4 #10
Workflow file for this run
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: "Auto release" | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
# This workflow triggers a release when merging a branch with the pattern `prepare-release/VERSION` into main. | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: 'Prepare a new version' | |
if: startsWith(github.head_ref, 'prepare-release/') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_RELEASE_PAT }} | |
fetch-depth: 0 | |
# https://github.com/actions-ecosystem/action-regex-match | |
- uses: actions-ecosystem/action-regex-match@v2 | |
id: version-regex | |
with: | |
# Parse version from head branch | |
text: ${{ github.head_ref }} | |
# match: preprare-release/xx.xx.xx | |
regex: '^prepare-release\/(\d+\.\d+\.\d+)(?:-(alpha|beta|rc)\.\d+)?$' | |
- name: Extract version | |
id: get_version | |
run: | | |
version=${{ steps.version-regex.outputs.match }} | |
version=${version/'prepare-release/'/''} | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Prepare release | |
uses: getsentry/action-prepare-release@lms/write-config-branch | |
if: github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' && steps.get_version.outputs.version != '' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} | |
with: | |
version: ${{ steps.get_version.outputs.version }} | |
force: false | |
merge_target: main | |
craft_config_from_merge_target: true |