-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (46 loc) · 1.4 KB
/
version-bump.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
49
50
51
52
53
54
55
56
57
58
59
name: 'Bump Version'
# on:
# workflow_dispatch:
# inputs:
# bump-mode:
# description: 'Select bump mode'
# required: true
# default: 'patch'
# type: choice
# options:
# - patch
# - minor
# - major
on:
pull_request:
branches: ['**']
env:
PATCH: patch
jobs:
bump-version:
name: 'Bump Version on master'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Checkout version-bump-sdk branch'
run: |
git fetch origin version-bump && git checkout version-bump || git checkout -b version-bump
- name: Print Current Branch
run: echo "$(git branch --show-current)"
- name: 'print current version'
run: npm pkg get version
# - name: Bump SDK version and commit to version-bump branch
# run: |
# npm version ${{ inputs.bump-mode }} -m "update package to version %s [skip cli]"
# id: update
- name: Bump SDK version and commit to version-bump branch
run: |
chmod +x ./.ci_steps/version-bump.sh
./.ci_steps/version-bump.sh ${{ env.PATCH }}
- name: 'print updated version'
run: npm pkg get version
# chmod +x ./.ci_steps/version-bump.sh
# ./.ci_steps/version-bump.sh ${{ env.PATCH }}