-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (73 loc) · 2.12 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
71
72
73
74
75
76
name: Build
on:
push:
branches:
- master
- test
paths-ignore:
- '*.md'
- 'assets/**'
- '**/.gitignore'
pull_request:
branches:
- master
paths-ignore:
- '*.md'
- '**/.gitignore'
- 'images/**/*'
workflow_dispatch:
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Commit Information
id: commit
run: |
echo "commit_id=commit-$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
echo "commit_message=$(git log -1 --pretty=%s)" >> $env:GITHUB_OUTPUT
- name: Cache fonts
id: cache-fonts
uses: actions/cache@v4
with:
path: files/fonts/*.ttf
key: fonts-${{ hashFiles('scripts/download_fonts.ps1') }}
- name: Download fonts
if: steps.cache-fonts.outputs.cache-hit != 'true'
run: |
scripts/download_fonts.ps1
- name: Create Patch
run: |
python -m pip install -r requirements.txt
scripts/build_patch.ps1
Compress-Archive -Path "out/00040000001CBE00/" -Destination "out/patch-3ds.zip" -Force
- name: Upload patch
uses: actions/upload-artifact@v4
with:
name: patch
path: |
out/00040000001CBE00/
- name: Upload character table
uses: actions/upload-artifact@v4
with:
name: char_table
path: |
out/char_table.json
- name: GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "out/patch-3ds.zip,out/char_table.json"
body: |
本页面下方的链接为自动构建并发布的开发版本补丁。此版本补丁可能存在较多问题,仅供测试使用。
name: ${{ steps.commit.outputs.commit_message }}
tag: publish
token: ${{ secrets.GITHUB_TOKEN }}