-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (41 loc) · 1.17 KB
/
bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: "bumper"
on:
workflow_dispatch:
inputs:
version:
description: How to bump package version
type: choice
options:
- patch
- minor
- major
required: true
jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Bumperz Login
id: bumperz
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
scope: ${{ github.repository_owner }}
- uses: actions/checkout@v4
with:
token: ${{ steps.bumperz.outputs.token }}
- name: Set Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: NPM Bump
id: bump
run: |
git config user.email '140910925+bumpzbot[bot]@users.noreply.github.com'
git config user.name 'bumpzbot[bot]'
npm version ${{ inputs.version }}
echo "version=$(jq -r .version < package.json)" >> "$GITHUB_OUTPUT"
- name: Push changes
run: |
git push origin main
git push origin v${{ steps.bump.outputs.version }}