Bump version #17
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: | |
semver: | |
description: 'Semver bump' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
bump-version: | |
name: Bump package ${{ inputs.semver }} version | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
repository: vHeemstra/is-apng | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
registry-url: https://registry.npmjs.org/ | |
- name: Set Git user | |
run: | | |
git config --global user.name 'vHeemstra' | |
git config --global user.email '[email protected]' | |
- run: npm install | |
- name: Major version | |
if: ${{ inputs.semver == 'major' }} | |
run: npm run bump:major | |
- name: Minor version | |
if: ${{ inputs.semver == 'minor' }} | |
run: npm run bump:minor | |
- name: Patch version | |
if: ${{ inputs.semver == 'patch' }} | |
run: npm run bump:patch |