Release a new version #190
Workflow file for this run
This file contains hidden or 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 a new version | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to increment' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| - preminor | |
| - premajor | |
| - prepatch | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| token: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }} | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: Release a new version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ADMIN_TOKEN }} | |
| run: | | |
| npm install -g release-it | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-action" | |
| release-it --increment=${{ github.event.inputs.version }} --ci --github.release --github.draft --git.commitMessage="chore: release v\${version}" --git.tagName="v\${version}" | |