-
Notifications
You must be signed in to change notification settings - Fork 1
259 lines (250 loc) · 10.4 KB
/
build.yaml
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
name: Build NVDA Lazy Edition
on:
push:
tags:
- "*"
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
download-addons:
runs-on: ubuntu-latest
strategy:
matrix:
addon:
- Name: DragAndDrop-2.2.1dev
URL: https://github.com/javidominguez/DragAndDrop/releases/download/2.2.1dev/DragAndDrop-2.2.1dev.nvda-addon
sha256: cf8af2b3190326218e827b502a1da544578b334824cb5b7e3027ebcfeb642efe
- Name: IBMTTS-23.12.1
URL: https://dl.nvdacn.com/NVDA-Addons/New/IBMTTS-23.12.1.nvda-addon
sha256: F96353B0329FB66319FC98B5748AB9D03C2A236762CF29F3B99EBACD04635451
- Name: MSEdgeDiscardAnnouncements-0.10
URL: https://dl.nvdacn.com/NVDA-Addons/New/MSEdgeDiscardAnnouncements-0.10.nvda-addon
sha256: 993eb9ba9849c3b6c7284fd6aaf84ad4a7b3a2707fbff54c5af4dd48a54124ca
- Name: numberProcessing-1.0.20240815
URL: https://github.com/ABuffEr/numberProcessing/releases/download/v1.0.20240815/numberProcessing-1.0.20240815.nvda-addon
sha256: 75cf08935b04a3c80335f1ed4dbda972e492178ff00abaeb0d197e4fb81eeb92
- Name: unmute-1.5.8
URL: https://github.com/grisov/Unmute/releases/download/v1.5.8/unmute-1.5.8.nvda-addon
sha256: b55759cc9ebf5581832adfa6a976d32874ae08a0968e8d60e78f5abbced87175
- Name: WorldVoice-3.7
URL: https://github.com/tsengwoody/WorldVoice/releases/download/v3.7/WorldVoice-3.7.nvda-addon
sha256: 8E25B0741769E6C84B2964D9701E0BE174605C795C3515524A6036C570AE35A9
steps:
- name: Cache ${{ matrix.addon.Name }} Addon
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/*.nvda-addon
key: ${{ matrix.addon.Name }}-${{ matrix.addon.sha256 }}
restore-keys: |
${{ matrix.addon.Name }}.nvda-addon
enableCrossOsArchive: true
- name: Download ${{ matrix.addon.Name }} Addon
id: download-addon
uses: carlosperate/download-file-action@v2
with:
file-url: ${{ matrix.addon.URL }}
sha256: ${{ matrix.addon.sha256 }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.addon.Name }}.nvda-addon
path: ${{ steps.download-addon.outputs.file-path }}
if-no-files-found: error
download-addons-from-addonStore:
runs-on: ubuntu-latest
strategy:
matrix:
addon:
- addonId: Access8Math
- addonId: addonsHelp
- addonId: addonsTools
- addonId: AiSound5
- addonId: audioManager
- addonId: baiduTranslation
- addonId: clipboardEnhancement
- addonId: enhancedTouchGestures
- addonId: goldenCursor
- addonId: ime_expressive
- addonId: inputLock
- addonId: instantTranslate
# - addonId: MSEdgeDiscardAnnouncements
- addonId: NVDACNMirror
- addonId: QQEnhancement
- addonId: remote
- addonId: resourceMonitor
# - addonId: unmute
- addonId: WeChatEnhancement
- addonId: xyOCR
steps:
- uses: actions/checkout@v4
with:
repository: nvaccess/addon-datastore.git
ref: views
sparse-checkout: |
views/zh_CN/latest/${{ matrix.addon.addonId }}
path: ${{ github.workspace }}/addon-datastore
- name: get ${{ matrix.addon.addonId }} addon data
uses: antifree/json-to-variables@v1.2.0
with:
filename: ${{ github.workspace }}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json
- name: Cache ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/*.nvda-addon
key: ${{ matrix.addon.addonId }}-${{ env.addonVersionName }}-${{ env.sha256 }}
restore-keys: |
${{ matrix.addon.addonId }}-${{ env.addonVersionName }}.nvda-addon
enableCrossOsArchive: true
- name: Download ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon
id: download-addon
uses: carlosperate/download-file-action@v2
with:
file-url: ${{ env.URL }}
sha256: ${{ env.sha256 }}
- name: Copy ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon JSON data
run: cp ${{ github.workspace }}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json ${{ github.workspace }}/${{ matrix.addon.addonId }}.json
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.addon.addonId }}-${{ env.addonVersionName }}.nvda-addon
path: |
${{ steps.download-addon.outputs.file-path }}
${{ github.workspace }}/${{ matrix.addon.addonId }}.json
if-no-files-found: error
download-resource:
runs-on: ubuntu-latest
strategy:
matrix:
resource:
- file: vcredist_x86.exe
URL: https://dl.nvdacn.com/Share/vcredist_x86.exe
sha256: B924AD8062EAF4E70437C8BE50FA612162795FF0839479546CE907FFA8D6E386
- file: speech-aisound.zip
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/VocalizerVoice/aisound.zip
sha256: B4FE1BED8F699179C8FF00F7B6F85AF4FF190ADCE1CCDB6C08132F93B7341EB2
- file: speech-VE.zip
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/VocalizerVoice/VE.zip
sha256: 35ACAC34551ED8288DC6185A33127F5109AD6CB8901B329667C095DC0085EDD3
- file: speech-voice.zip
URL: https://dl.nvdacn.com/Share/voice.zip
sha256: AB2D6AFD7C5E12901DD3DA3CDC29325AA11A9DAB2EAC608D7B731993B2066450
- file: speech-IBM_ViaVoice_TTS_Runtime-V6.405.exe
URL: https://dl.nvdacn.com/NVDA-Addons/TTS/IBM_ViaVoice_TTS_Runtime-V6.405.exe
sha256: A0FB592EFBC838921931C5BB4B32C176FC618052B4DDBFD6B08D3FBC66DEE12A
steps:
- name: Cache ${{ matrix.resource.file }}
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/*
key: ${{ matrix.resource.file }}-${{ matrix.resource.sha256 }}
restore-keys: |
${{ matrix.resource.file }}
enableCrossOsArchive: true
- name: Download ${{ matrix.resource.file }}
id: download-Resource
uses: carlosperate/download-file-action@v2
with:
file-url: ${{ matrix.resource.URL }}
sha256: ${{ matrix.resource.sha256 }}
- name: Upload ${{ matrix.resource.file }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.resource.file }}
path: ${{ steps.download-Resource.outputs.file-path }}
if-no-files-found: error
download-NVDA:
runs-on: ubuntu-latest
env:
NVDA_RELEASES_BASE_URL: https://www.nvaccess.org/files/nvda/releases
outputs:
NVDA: nvda_${{ steps.nvda.outputs.replaced }}.exe
steps:
- id: nvda-tag
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: nvaccess/nvda
excludes: ${{ !contains(github.ref, 'rc') && 'prerelease, draft' || '' }}
- id: nvda
uses: frabert/replace-string-action@v2
with:
pattern: 'release-(.*)'
string: ${{ steps.nvda-tag.outputs.release }}
replace-with: '$1'
- name: Cache nvda_${{ steps.nvda.outputs.replaced }}.exe
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/nvda_${{ steps.nvda.outputs.replaced }}.exe
key: nvda_${{ steps.nvda.outputs.replaced }}
restore-keys: |
nvda_${{ steps.nvda.outputs.replaced }}.exe
enableCrossOsArchive: true
- name: Download nvda_${{ steps.nvda.outputs.replaced }}.exe
id: download-nvda
uses: carlosperate/download-file-action@v2
with:
file-url: ${{ env.NVDA_RELEASES_BASE_URL }}/${{ steps.nvda.outputs.replaced }}/nvda_${{ steps.nvda.outputs.replaced }}.exe
- name: Upload nvda_${{ steps.nvda.outputs.replaced }}.exe
uses: actions/upload-artifact@v4
with:
name: nvda_${{ steps.nvda.outputs.replaced }}.exe
path: ${{ steps.download-nvda.outputs.file-path }}
if-no-files-found: error
build:
runs-on: windows-latest
needs:
- download-NVDA
- download-resource
- download-addons
- download-addons-from-addonStore
steps:
- uses: actions/checkout@v4
- name: Download ${{ needs.download-NVDA.outputs.NVDA }}
uses: actions/download-artifact@v4
with:
name: ${{ needs.download-NVDA.outputs.NVDA }}
path: ${{ github.workspace }}/Resource/
- name: Download vcredist_x86.exe
uses: actions/download-artifact@v4
with:
name: vcredist_x86.exe
path: ${{ github.workspace }}/Resource/
- name: Download Speech Resource
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/Resource/speech/
pattern: speech-*
merge-multiple: true
- name: Download Resource Addons
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/Resource/Addons/
pattern: "*.nvda-addon"
merge-multiple: true
- run: ${{ github.workspace }}/执行脚本.bat GITHUB_ACTIONS
- name: Upload Output
uses: actions/upload-artifact@v4
with:
name: NVDA_Lazy_Edition
path: ${{ github.workspace }}/Output/Archive/*
upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: build
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: NVDA_Lazy_Edition
path: NVDA_Lazy_Edition
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: softprops/action-gh-release@v2
with:
body: 详细更新日志请[点此查看](documentation/changes.md)。
files: NVDA_Lazy_Edition/*
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, 'rc') }}