更新 .gitea/workflows/gendiff.yml

This commit is contained in:
azw
2024-11-26 06:39:20 +08:00
parent e670d73a5b
commit dd918cb274

View File

@@ -9,23 +9,23 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Gen Diff - name: Gen Diff
run: | run: |
bash tools/diff.sh bash tools/diff.sh
git config user.name test git config user.name test
git config user.email test@github.com git config user.email test@github.com
git add . git add .
git commit --allow-empty -m "$(date '+%Y-%m-%d %H:%M:%S')" git commit --allow-empty -m "$(date '+%Y-%m-%d %H:%M:%S')"
git diff main origin/main --name-only > diff git diff main origin/main --name-only > diff
sed -i 's/src\/common\/units\/names_ships\/CHI_ship_names.txt//g' diff sed -i 's/src\/common\/units\/names_ships\/CHI_ship_names.txt//g' diff
sed -i 's/src\/common\/on_actions\/00_navy_rework.txt//g' diff sed -i 's/src\/common\/on_actions\/00_navy_rework.txt//g' diff
zip archive.zip $(sed '/^$/d' diff) zip archive.zip $(sed '/^$/d' diff)
- name: Upload - name: Upload
uses: https://gitea.com/actions/gitea-release-action@v1 uses: https://gitea.com/actions/gitea-release-action@v1
with: with:
files: |- files: |-
archive.zip archive.zip
api_key: '${{ secrets.GITHUB_TOKEN }}' api_key: '${{ secrets.GITHUB_TOKEN }}'
tag_name: 'Diff' tag_name: 'Diff'