Create new version (package.json & CHANGELOG) #7
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 new version (package.json & CHANGELOG) | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
create-new-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'main' | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Create version & CHANGELOG | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Pyroscope Bot <[email protected]>" | |
npm version ${{ inputs.version }} | |
- name: Push | |
run: git push origin main --tags |