This commit is contained in:
YuCat-OVO 2024-03-01 18:45:02 +08:00
parent 9626ad29ce
commit 74a225d2dc
2 changed files with 5 additions and 8 deletions

View File

@ -5,7 +5,6 @@ on:
push: push:
branches: branches:
- "main" - "main"
- "info"
paths-ignore: paths-ignore:
- '.github/**' - '.github/**'
- 'docs/**' - 'docs/**'

View File

@ -8,7 +8,7 @@ on:
branches: branches:
- "main" - "main"
paths: paths:
- 'get_version.py' - "get_version.py"
jobs: jobs:
get-version: get-version:
@ -27,6 +27,8 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with:
python-version: "3.11.7"
- name: Run Script - name: Run Script
run: | run: |
@ -35,12 +37,8 @@ jobs:
- name: Git push assets to "info" branch - name: Git push assets to "info" branch
run: | run: |
if ! ([ -f "info.json" ] && [ -f "url.json" ]); then exit 1; else mkdir info; mv {info,url}.json info; cd info; fi
git init
git config --local user.name "github-actions[bot]" git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b info git add *.json
git add .
git commit -m "${{ steps.set-vars.outputs.RELEASE_NAME }}" git commit -m "${{ steps.set-vars.outputs.RELEASE_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" git push
git push -f -u origin info