-
Notifications
You must be signed in to change notification settings - Fork 25
119 lines (115 loc) · 3.35 KB
/
nightly.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
name: Nightly Build
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
x86:
runs-on: windows-latest
name: 32-bit Build
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure build for x86
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: x86
- name: Build
run: |
cmake -B x86 -A Win32
cmake --build x86 --config Release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: |
x86\libchewing\data\*.dat
x86\libchewing\data\*.tab
x86\ChewingTextService\Release\*.dll
x86\libchewing\Release\*.dll
x86\ChewingPreferences\Release\*.exe
name: x86
retention-days: 1
x64:
runs-on: windows-latest
name: 64-bit Build
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Configure build for x64
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: x64
- name: Build
run: |
cmake -B x64 -A x64
cmake --build x64 --config Release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: |
x64\libchewing\data\*.dat
x64\libchewing\data\*.tab
x64\ChewingTextService\Release\*.dll
x64\libchewing\Release\*.dll
x64\ChewingPreferences\Release\*.exe
name: x64
retention-days: 1
package:
runs-on: windows-latest
name: Build Installer
needs: [x86, x64]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: NSIS
run: |
mkdir nsis
copy installer\* nsis\
copy COPYING.txt nsis\
mkdir nsis\Dictionary
copy x64\libchewing\data\*.dat nsis\Dictionary\
copy x64\libchewing\data\*.tab nsis\Dictionary\
mkdir nsis\x86
copy x86\ChewingTextService\Release\*.dll nsis\x86\
copy x86\libchewing\Release\*.dll nsis\x86\
copy x86\ChewingPreferences\Release\*.exe nsis\
mkdir nsis\x64
copy x64\ChewingTextService\Release\*.dll nsis\x64\
copy x64\libchewing\Release\*.dll nsis\x64\
cd nsis
makensis installer.nsi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: nsis\windows-chewing-tsf.exe
name: nsis
retention-days: 1
upload:
name: Update Nightly Release
permissions:
contents: write
runs-on: ubuntu-latest
needs: [package]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: nsis
- name: Compute Checksum
run: |
sha256sum windows-chewing-tsf.exe > SHA256SUMS.txt
- name: Update nightly release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
prerelease: true
name: "Windows Chewing TSF nightly build $$"
body: |
This is a nightly build of Windows Chewing TSF.
files: |
./SHA256SUMS.txt
./windows-chewing-tsf.exe