Skip to content

Commit c475211

Browse files
committed
feat: add GitHub Actions workflow to write and commit version file
1 parent b2fe6af commit c475211

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/version.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Write version file
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
version:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Write storage/app/version.json
17+
run: |
18+
mkdir -p storage/app
19+
echo '{"commit":"${{ github.sha }}"}' > storage/app/version.json
20+
21+
- name: Commit version file
22+
uses: stefanzweifel/git-auto-commit-action@v5
23+
with:
24+
commit_message: "chore: update version.json [skip ci]"
25+
file_pattern: storage/app/version.json

0 commit comments

Comments
 (0)