bump-version #34
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: bump-version | |
on: | |
workflow_dispatch: | |
inputs: | |
type: | |
type: choice | |
description: Type of version bump | |
required: true | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
bump: | |
name: Bump to a new version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Configure user | |
run: | | |
git config --local user.name "${{ github.actor }}" | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Bump the version | |
run: npm version ${{ github.event.inputs.type }} | |
- name: Push commit | |
run: git push origin master:master | |
- name: Push tag | |
run: git push origin --tags |