-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.2 KB
/
main.yml
File metadata and controls
47 lines (39 loc) · 1.2 KB
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
# .github/workflows/bump-version.yml
name: Auto Bump Version
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
permissions:
contents: write
pull-requests: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Node dependencies
working-directory: MyMusicClientSveltePwa
run: npm ci
- name: Bump version (no commit)
working-directory: MyMusicClientSveltePwa
run: npm version patch --no-git-tag-version
# Optional: Commit version bump to the PR branch (not to main)
- name: Commit version bump to PR branch
working-directory: MyMusicClientSveltePwa
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add package.json package-lock.json
git commit -m "chore: bump version"
git push origin HEAD:${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}