-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (89 loc) · 2.47 KB
/
ci.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
name: ci
on:
push:
branches:
- master
tags:
- '[0-9]+.*'
pull_request:
jobs:
build:
runs-on: ubuntu-24.04
env:
EMSCRIPTEN_VERSION: '3.1.74'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: |
sudo apt install -y --no-install-recommends \
ninja-build \
gettext
npm i -g pnpm
pnpm i
./scripts/install-deps.sh
- name: Install emsdk
run: |
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
- name: Build
run: |
. emsdk/emsdk_env.sh
pnpm run configure
pnpm run build
npm pack
mv fcitx5-rime-*.tgz fcitx5-rime.tgz
- name: Build rime-ice
uses: rimeinn/deploy-schema@master
with:
user-recipe-list: |-
iDvel/rime-ice:others/recipes/full
shared-recipe-list:
package-items: |-
build
lua
opencc
custom_phrase.txt
- name: Build demo
run: |
cd demo
mv /tmp/deploy-schema/artifact.zip public/rime-ice.zip
pnpm i
pnpm run build
mkdir rime-ice
mv dist rime-ice # Wrap a directory for artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rime-ice
path: |
demo/rime-ice
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Create nightly release
if: ${{ github.ref == 'refs/heads/master' }}
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Nightly Build"
files: |
fcitx5-rime.tgz
- name: Create stable release
if: ${{ github.ref_type == 'tag' }}
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: false
title: ${{ github.ref_name }}
files: |
fcitx5-rime.tgz