Creating new version patch #1
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: Create version | |
run-name: 'Creating new version ${{ github.event.inputs.versionType }}' | |
'on': | |
workflow_dispatch: | |
inputs: | |
versionType: | |
description: Version type | |
required: true | |
default: patch | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
- premajor | |
- preminor | |
- prepatch | |
- prerelease | |
package: | |
description: Package | |
required: true | |
default: patch | |
type: choice | |
options: | |
- cli | |
- lib | |
jobs: | |
create-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
- name: 'Generate new version ${{ github.event.inputs.versionType }}' | |
run: | | |
cd packages/${{ github.event.inputs.package }} | |
npm version ${{ github.event.inputs.versionType }} | |
- name: Push the tags | |
run: git push origin main --tags |