-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 1.77 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'assets/'
workflow_dispatch:
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install Pillow
- run: echo "${{ secrets.ORIGINAL_FILES_URL }}" > original_files_url.txt
- name: Cache original files
id: cache-original-files
uses: actions/cache@v3
with:
path: original_files/
key: original-files-${{ hashFiles('original_files_url.txt') }}
- name: Cache dotnet script
id: cache-dotnet-script
uses: actions/cache@v3
with:
path: ~/.dotnet/tools/
key: original-files-dotnet-script
- name: Build patch
env:
ORIGINAL_FILES_URL: "${{ secrets.ORIGINAL_FILES_URL }}"
PYTHONUTF8: 1
run: |
Try
{
if (dotnet-script -h) {}
}
Catch
{
dotnet tool install -g dotnet-script
}
./build.ps1
- name: Upload patch
uses: actions/upload-artifact@v3
with:
name: patch
path: |
out/patch/*
- name: GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "out/patch.xzp"
name: "《异色代码 两种记忆》汉化修正"
body: "[补丁应用工具](https://github.com/Xzonn/NitroPatcher/releases/latest/)"
prerelease: true
tag: publish
token: ${{ secrets.GITHUB_TOKEN }}