Skip to content

Commit 705cf4c

Browse files
committed
✨ 更新版本自动写入
1 parent 2b31a88 commit 705cf4c

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/build_and_publish.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
id: create_release
1515
uses: actions/create-release@v1
1616
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1818
with:
19-
tag_name: ${{ github.ref }}
20-
release_name: Release ${{ github.ref }}
19+
tag_name: ${{github.ref}}
20+
release_name: Release ${{github.ref}}
2121
draft: false
2222
prerelease: false
2323
build:
@@ -50,5 +50,18 @@ jobs:
5050
registry.cn-hangzhou.aliyuncs.com/silianz/python-openbmclapi:latest
5151
registry.cn-hangzhou.aliyuncs.com/silianz/python-openbmclapi:${{env.RELEASE_VERSION}}
5252
platforms: linux/amd64, linux/arm64
53-
53+
update:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- name: Write version
58+
run: echo "${github.ref}" > VERSION
59+
- name: Commit and push
60+
run: |
61+
git add VERSION
62+
git config --global user.name "github-actions[bot]"
63+
git commit -a -m ":sparkles: 更新 VERSION"
64+
git push
65+
66+
5467

0 commit comments

Comments
 (0)