Prepare Release #26
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: Prepare Release | |
on: | |
workflow_dispatch: | |
inputs: | |
semverBump: | |
description: 'Specify next SemVer version (either of: "patch", "minor", "major", "prepatch", "preminor", "premajor", or custom SemVer compatible version (e.g. "0.32.1-beta.1", or "1.0.0"))' | |
type: string | |
required: true | |
default: 'patch' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install node dependencies | |
run: npm ci | |
- name: Set up git config | |
run: | | |
git config author.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com" | |
git config author.name "${{ github.event.sender.login }}" | |
git config committer.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config committer.name "GitHub Actions Bot" | |
git config user.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com" | |
git config user.name "${{ github.event.sender.login }}" | |
- name: Create release Pull request & GitHub Release | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
run: npm run release ${{ inputs.semverBump }} |