Release PR #10
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: Release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
type: | |
type: choice | |
description: Choose release type | |
options: | |
- auto | |
- patch | |
- minor | |
- major | |
default: auto | |
jobs: | |
releaseIt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: git config | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: Install dependancies | |
run: yarn install --frozen-lockfile | |
- name: Prepare release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"patch", "minor":"minor", "major":"major"}')[github.event.inputs.type] }} | |
run: yarn run release $TYPE_ARG --ci --verbose --no-git.push --no-git.commit --no-git.tag --no-github | |
- name: Show git status | |
if: failure() | |
run: git status && git diff | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
- name: Extract release notes | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v1 | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v4 | |
id: cpr | |
with: | |
branch: release | |
delete-branch: true | |
commit-message: 'chore(release): v${{ steps.package-version.outputs.current-version}}' | |
title: '[Release] v${{ steps.package-version.outputs.current-version}}' | |
body: | | |
Release notes for this release found in (CHANGELOG.md)[./CHANGELOG.md] | |
labels: | | |
release | |
automated pr | |
signoff: false | |
draft: false |