-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from chewing/nightly-build
Setup Nightly pre-release
- Loading branch information
Showing
3 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters