-
Notifications
You must be signed in to change notification settings - Fork 46
158 lines (137 loc) · 5.81 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'false'
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.3.1'
- name: Build Packages
run: |
corepack enable
yarn install --immutable
yarn build
shell: bash
- name: Upload LiteLoaderQQNT Plugin
uses: actions/upload-artifact@v3
with:
name: chronocat-llqqnt-${{ github.sha }}
path: build/dist/llqqnt
- name: Upload engine-chronocat-api LiteLoaderQQNT Plugin
uses: actions/upload-artifact@v3
with:
name: chronocat-llqqnt-engine-chronocat-api-${{ github.sha }}
path: build/dist/llqqnt-plugin-chronocat-engine-chronocat-api
- name: Upload engine-chronocat-event LiteLoaderQQNT Plugin
uses: actions/upload-artifact@v3
with:
name: chronocat-llqqnt-engine-chronocat-event-${{ github.sha }}
path: build/dist/llqqnt-plugin-chronocat-engine-chronocat-event
- name: Upload engine-media LiteLoaderQQNT Plugin
uses: actions/upload-artifact@v3
with:
name: chronocat-llqqnt-engine-media-${{ github.sha }}
path: build/dist/llqqnt-plugin-chronocat-engine-media
# - name: Upload engine-chronocat-api
# uses: actions/upload-artifact@v3
# with:
# name: engine-chronocat-api-${{ github.sha }}
# path: build/dist/engine-chronocat-api
# - name: Upload engine-chronocat-event
# uses: actions/upload-artifact@v3
# with:
# name: engine-chronocat-event-${{ github.sha }}
# path: build/dist/engine-chronocat-event
# - name: Upload engine-chronocat-event
# uses: actions/upload-artifact@v3
# with:
# name: engine-media-${{ github.sha }}
# path: build/dist/engine-media
# - name: Upload IIFE
# uses: actions/upload-artifact@v3
# with:
# name: chronocat-iife-${{ github.sha }}
# path: build/dist/iife
- name: Build IIFE-TI
env:
TI_KEY: ${{ secrets.TI_KEY }}
if: env.TI_KEY != null
run: |
mkdir -p build/dist/iife-ti
echo "$TI_KEY" > $RUNNER_TEMP/ti.pem
openssl dgst -sha256 -sign $RUNNER_TEMP/ti.pem -keyform PEM -out build/dist/iife-ti/chronocat.js.ti.bin -binary build/dist/iife/chronocat.js
rm $RUNNER_TEMP/ti.pem
cat build/dist/iife/chronocat.js >> build/dist/iife-ti/chronocat.js.ti.bin
shell: bash
- name: Upload IIFE-TI
env:
TI_KEY: ${{ secrets.TI_KEY }}
if: env.TI_KEY != null
uses: actions/upload-artifact@v3
with:
name: chronocat-iife-ti-${{ github.sha }}
path: build/dist/iife-ti/chronocat.js.ti.bin
- name: Upload Build Metadata
uses: actions/upload-artifact@v3
with:
name: meta-${{ github.sha }}
path: build/meta
- name: Publish LiteLoaderQQNT-Plugin-Chronocat
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
user_name: 'Il Harper'
user_email: '[email protected]'
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat
publish_branch: master
publish_dir: build/dist/llqqnt/LiteLoaderQQNT-Plugin-Chronocat
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
commit_message: 'chore: publish ${{ github.sha }}'
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
user_name: 'Il Harper'
user_email: '[email protected]'
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
publish_branch: master
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-chronocat-api/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Api
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
commit_message: 'chore: publish ${{ github.sha }}'
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
user_name: 'Il Harper'
user_email: '[email protected]'
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
publish_branch: master
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-chronocat-event/LiteLoaderQQNT-Plugin-Chronocat-Engine-Chronocat-Event
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
commit_message: 'chore: publish ${{ github.sha }}'
- name: Publish LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
user_name: 'Il Harper'
user_email: '[email protected]'
external_repository: chrononeko/LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
publish_branch: master
publish_dir: build/dist/llqqnt-plugin-chronocat-engine-media/LiteLoaderQQNT-Plugin-Chronocat-Engine-Media
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
commit_message: 'chore: publish ${{ github.sha }}'