Skip to content

Commit a26ea2c

Browse files
committed
Add workflow for version bump
1 parent 30a61f6 commit a26ea2c

4 files changed

Lines changed: 44 additions & 56 deletions

File tree

.github/workflows/version-bump.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Version Bump
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
description: 'Bump x.y.z (triggers release): patch=z, minor=y (resets z), major=x (resets y, z)'
8+
type: choice
9+
default: 'patch'
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
15+
permissions: {}
16+
17+
jobs:
18+
bump:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Generate GitHub token
22+
uses: actions/create-github-app-token@v2
23+
id: generate-token
24+
with:
25+
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
26+
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
27+
28+
- uses: actions/checkout@v4
29+
with:
30+
token: ${{ steps.generate-token.outputs.token }}
31+
32+
- name: Configure git
33+
run: |
34+
git config user.name "github-actions[bot]"
35+
git config user.email "github-actions[bot]@users.noreply.github.com"
36+
37+
# Bumps the version, commits to main, and pushes a v* tag.
38+
# The tag push triggers the Release workflow (publish.yml), which publishes to npm.
39+
- name: Bump version
40+
run: npm version ${{ inputs.bump }} -m "Release v%s"
41+
42+
- name: Push commit and tag
43+
run: git push --follow-tags origin main

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44

55
## Documentation
66

7-
- **[Development Guide](readme-dev.md)** - Setup, configuration, and building binaries
8-
- **[Release Instructions](release.md)** - How to create a new release
7+
- **[Development Guide](readme-dev.md)** - Setup, configuration, and building binaries

release.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

release.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)