From e670d73a5b85f9789c20f948b688a178e026afe4 Mon Sep 17 00:00:00 2001 From: azw Date: Tue, 26 Nov 2024 06:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20.gitea/workflows/gendiff.y?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/gendiff.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/gendiff.yml diff --git a/.gitea/workflows/gendiff.yml b/.gitea/workflows/gendiff.yml new file mode 100644 index 0000000..481d0f4 --- /dev/null +++ b/.gitea/workflows/gendiff.yml @@ -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' \ No newline at end of file