Skip to content

Commit

Permalink
chore: 优化GitHub Actions工作流以自动递增版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwei committed Sep 30, 2024
1 parent ba44d6a commit 8e9f08d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: 获取版本号
- name: 获取并递增版本号
id: version
run: |
echo "::set-output name=new-version::$(cat VERSION)"
NEW_VERSION=$(echo $(cat VERSION) | awk -F. '{printf("%d.%d.%d\n",$1,$2,$3+1)}')
echo "::set-output name=new-version::$NEW_VERSION"
- name: 更新版本号并推送更改
env:
Expand Down

0 comments on commit 8e9f08d

Please sign in to comment.