-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (28 loc) · 929 Bytes
/
Copy pathbump-version.yml
File metadata and controls
32 lines (28 loc) · 929 Bytes
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
name: Bump version
on:
push:
branches: [main]
paths: ['src/**', 'container/**']
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Bump patch version
run: |
npm version patch --no-git-tag-version
git add package.json package-lock.json
git diff --cached --quiet && exit 0
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
VERSION=$(node -p "require('./package.json').version")
git commit -m "chore: bump version to $VERSION"
git pull --rebase
git push