Skip to content

Commit 310e81b

Browse files
committed
Add bump-version workflow
1 parent 59551dd commit 310e81b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Create bump version PR
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to change to (semver).
8+
required: true
9+
type: string
10+
11+
jobs:
12+
bump-version-pr:
13+
name: Bump version PR
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
shell: bash
18+
steps:
19+
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
ref: main
24+
25+
- name: Use Node.js from nvmrc
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: '.nvmrc'
29+
30+
- name: Bump version
31+
run: |
32+
npm version --commit-hooks false --git-tag-version false ${{ inputs.version }}
33+
./build/bump-version-changelog.js ${{ inputs.version }}
34+
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@v7
37+
with:
38+
commit-message: Bump version to ${{ inputs.version }}
39+
branch: bump-version-to-${{ inputs.version }}
40+
title: Bump version to ${{ inputs.version }}

0 commit comments

Comments
 (0)