pokemon-showdown/.github/workflows/update_version.yml
Sergio Garcia d044cd7bc5
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Github Actions: Fix linter issues and bump old actions (#11101)
As reported by `actionlint`
2025-05-12 07:13:58 -07:00

43 lines
1.3 KiB
YAML

name: Update the npm package version
on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
description: Version type
default: patch
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- id: bump_version
run: |
echo "old_version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
npm version ${{ github.event.inputs.version }} --no-git-tag-version
echo "new_version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
- uses: peter-evans/create-pull-request@v7
with:
title: Bump package.json version to v${{ steps.bump_version.outputs.new_version }}}
body: |
Bump package.json version from `v${{ steps.bump_version.outputs.old_version }}` to `v${{ steps.bump_version.outputs.new_version }}`
commit-message: Bump package.json version to v${{ steps.bump_version.outputs.new_version }}
branch: npm-version-bump
base: master