Release #19
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
bump_type: | |
type: choice | |
required: true | |
description: What kind of version bump? | |
options: | |
- patch | |
- minor | |
- major | |
is_prerelease: | |
description: 'Set the version as a pre-release version' | |
required: false | |
type: boolean | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Git setup | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Setup node and npm | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'npm' | |
cache-dependency-path: | | |
.release-it.json | |
package.json | |
- name: Release | |
run: npm run release ${{ github.event.inputs.bump_type }} ${{ (github.event.inputs.bump_type && '--preRelease=canary') || '' }} --ci | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |