forked from Joohansson/NanoRPCProxy
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.35 KB
/
bump-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
name: Bump Version
on:
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
bum-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Calculate version
id: tag-version
uses: mathieudutour/github-tag-action@v6.1
with:
dry_run: true
github_token: ${{ secrets.GITHUB_TOKEN }}
# Configure Git
- name: Git configuration
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Bump npm version
run: npm version --commit-hooks false --git-tag-version false ${{ steps.tag-version.outputs.new_tag }}
- name: Commit updated npm package.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[skip ci] bump npm version to ${{ steps.tag-version.outputs.new_tag }}'
branch: main
file_pattern: 'package*.json'
commit_user_name: trust-ci
commit_user_email: "trust-ci@users.noreply.github.com"
- name: Bump version and push tag
uses: mathieudutour/github-tag-action@v6.1
with:
custom_tag: ${{ steps.tag-version.outputs.new_version }}
github_token: ${{ secrets.GITHUB_TOKEN }}