-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.03 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
name: Version Bump
on:
pull_request:
types: [closed]
branches:
- main
jobs:
version-bump:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- name: Fetch all history for version bumping
run: git fetch --prune --unshallow
- name: Get Pull Request Labels
id: get_labels
run: echo "PR_LABELS=$(echo '${{ github.event.pull_request.labels }}')" >> $GITHUB_ENV
- name: Bump version
run: ruby .github/scripts/version_bump.rb
- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add lib/nse_data/version.rb
git commit -m "Bump version by github-actions"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}