-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (43 loc) · 1.21 KB
/
2.version.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
48
name: Version
on:
push:
branches: [main]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: npm run test
version:
needs: [test]
name: Bump version
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- id: version
name: Bump version
uses: phips28/gh-action-bump-version@master
with:
skip-commit: true
- name: Update
run: |
echo "`jq '.version="${{ steps.version.outputs.newTag }}"' package.json`" > package.json
echo "`jq '.version="${{ steps.version.outputs.newTag }}"' jsr.json`" > jsr.json
- name: Commit
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add package.json jsr.json && git commit -m "ci: version bump to ${{ steps.version.outputs.newTag }}"
git push