generated from Decatur-Robotics/npm-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.05 KB
/
increment_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
name: Increment Version
on:
workflow_call:
workflow_dispatch:
pull_request:
branches: [main]
types: [opened]
jobs:
check_package_name:
uses: ./.github/workflows/check_package_name.yml
increment:
runs-on: ubuntu-latest
needs: check_package_name
if: needs.check_package_name.outputs.package_name != '"npm-package-template"'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # We need to checkout the head branch, not the temporary merge branch
persist-credentials: false
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Set name
run: git config user.name "Gearbox Bot"
- name: Set email
run: git config user.email "[email protected]"
- name: Increment patch number
run: npm version patch
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GIT_PUSH_TOKEN }}
branch: ${{ github.head_ref }}