Skip to content

Commit

Permalink
Merge branch 'release/v1.4.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
StarrySky-skyler committed May 13, 2024
2 parents df42d65 + a0b2b27 commit 4e3f1ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/update_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,11 @@ def updateMD(file):
f.write(Content)

@pysnooper.snoop()
def commitMD():
def release():
"""提交更改"""
# 获取最新的提交对象
latestCommit = repo.get_commits()[0]

# commit changes
call(['git', 'add', '.'])
call(['git', 'commit', '-m', 'docs[bot]: Auto update README.md'])
call(['git', 'push', 'origin', 'main'])

# create release

# 获取最新提交的 commit message 属性
Expand All @@ -70,7 +65,6 @@ def commitMD():
repo.create_git_release(tag=tagName, name=tagName, message=tagMessage)

if __name__ == '__main__':
call(['git', 'checkout', 'main'])
updateMD('README.md')
updateMD('README_zh_cn.md')
commitMD()
release()
12 changes: 11 additions & 1 deletion .github/workflows/update_md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
run: |
git config --global user.name "Starry Trace Sky"
git config --global user.email "starrytracesky@qq.com"
git checkout main
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -29,7 +30,16 @@ jobs:
- name: Install requirements
run: pip install -r requirements.txt

- name: Run Python script
- name: Update README and Publish Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/workflows/update_md.py

- name: Commit, merge and push changes
run: |
git add -A
git commit -m "docs[bot]: Auto update README.md"
git merge develop
git push origin main
git checkout develop
git push origin develop

0 comments on commit 4e3f1ad

Please sign in to comment.