Commit 20278040 authored by 赵小蒙's avatar 赵小蒙
Browse files

fix error

parent 9d0b4e95
...@@ -18,6 +18,9 @@ jobs: ...@@ -18,6 +18,9 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: master # 确保签出 master 分支
fetch-depth: 0 # 确保获取完整的 git 历史记录
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
...@@ -42,14 +45,14 @@ jobs: ...@@ -42,14 +45,14 @@ jobs:
echo "No changes to commit" echo "No changes to commit"
else else
git commit -m "Update version.py with new version" git commit -m "Update version.py with new version"
fi id: commit_changes
- name: Push changes - name: Push changes
if: always() # 确保始终运行此步骤 if: steps.commit_changes.outcome == 'success'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
git push origin master git push origin HEAD:master
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment