Skip to content

Commit e62ef56

Browse files
committed
version
1 parent 97263dd commit e62ef56

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update Version on File Change
2+
on:
3+
push:
4+
paths:
5+
- 'Pagetual/items_all.json'
6+
- 'Pagetual/pagetualRules.json'
7+
8+
jobs:
9+
update_version:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Read current version
16+
id: read_version
17+
run: echo "::set-output name=version::$(cat Pagetual/version)"
18+
19+
- name: Increment version
20+
id: increment_version
21+
run: echo "::set-output name=version::$((${{ steps.read_version.outputs.version }} + 1))"
22+
23+
- name: Update version file
24+
run: echo "${{ steps.increment_version.outputs.version }}" > Pagetual/version
25+
26+
- name: Commit version update
27+
run: |
28+
git config --local user.email "rixixi@gmail.com"
29+
git config --local user.name "hoothin-update"
30+
git add Pagetual/version
31+
git commit -m "Update version of Pagetual rules to ${{ steps.increment_version.outputs.version }}"
32+
git push https://${{ secrets.ACTION_SECRET }}@github.com/${{ github.repository }}

Pagetual/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0

0 commit comments

Comments
 (0)