添加 .gitea/workflows/gendiff.yml
This commit is contained in:
31
.gitea/workflows/gendiff.yml
Normal file
31
.gitea/workflows/gendiff.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: gendiff
|
||||||
|
run-name:
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Gen Diff
|
||||||
|
run: |
|
||||||
|
bash tools/diff.sh
|
||||||
|
git config user.name test
|
||||||
|
git config user.email test@github.com
|
||||||
|
git add .
|
||||||
|
git commit --allow-empty -m "$(date '+%Y-%m-%d %H:%M:%S')"
|
||||||
|
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\/on_actions\/00_navy_rework.txt//g' diff
|
||||||
|
zip archive.zip $(sed '/^$/d' diff)
|
||||||
|
- name: Upload
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
archive.zip
|
||||||
|
api_key: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
tag_name: 'Diff'
|
||||||
Reference in New Issue
Block a user