Update package version #8
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
# This workflow bumps the package.json version and creates a PR | |
name: Update package version | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
workflow_dispatch: | |
inputs: | |
segment: | |
description: Semver segment to update | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- minor | |
- patch | |
jobs: | |
update-version: | |
name: Update package version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: echo "Updating ${{ inputs.segment }} version" | |
- name: Update version | |
run: npm --no-git-tag-version version ${{ inputs.segment }} | |
- uses: peter-evans/create-pull-request@v4 | |
with: | |
base: main | |
branch: version/automated | |
title: Update package version (automated) | |
commit-message: Update package version | |
body: Automated update to ${{ inputs.segment }} version |