Skip to content

Commit d76eda2

Browse files
committed
ci: 删除旧的发布工作流并添加新的夜间构建工作流
1 parent 32cee29 commit d76eda2

File tree

3 files changed

+80
-136
lines changed

3 files changed

+80
-136
lines changed

.github/workflows/NightlyBuild.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: NightlyBuild
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1' # 每周一 00:00 UTC 执行
6+
workflow_dispatch:
7+
8+
jobs:
9+
Release:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'LIPiston/rime-ice'
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Pack dicts
18+
run: |
19+
## 备用 Prepare opencc dict, 启用后 emoji.json 也要做改动
20+
# apt install opencc
21+
# opencc_dict -i opencc/emoji.txt -o opencc/emoji.ocd2 -f text -t ocd2
22+
23+
mkdir dist
24+
echo "Pack all ..."
25+
find . -maxdepth 1 -name "*.lua" -o -name "*.yaml" -o -name "*.txt" | zip dist/full.zip -@
26+
zip -r dist/full.zip cn_dicts cn_dicts_cell en_dicts lua opencc LICENSE
27+
echo "Pack dicts ..."
28+
zip -r dist/all_dicts.zip cn_dicts en_dicts opencc radical_pinyin.dict.yaml
29+
echo "Pack cn_dicts ..."
30+
zip -r dist/cn_dicts.zip cn_dicts
31+
echo "Pack cn_dicts_cell ..."
32+
zip -r dist/cn_dicts_cell.zip cn_dicts_cell
33+
echo "Pack en_dicts ..."
34+
zip -r dist/en_dicts.zip en_dicts
35+
echo "Pack opencc ..."
36+
zip -r dist/opencc.zip opencc
37+
echo "copy LICENSE and README.md..."
38+
cp LICENSE dist/LICENSE.txt
39+
cp README.md dist/README.md
40+
41+
- name: Create nightly release
42+
if: ${{ github.ref == 'refs/heads/main' }}
43+
uses: "softprops/action-gh-release@v2"
44+
with:
45+
body: |
46+
## 说明
47+
48+
这里是每次提交后自动打包的版本,包含最新的功能和词库
49+
50+
- `README.md`:简易的使用说明
51+
- `full.zip` : 包含所有词典和方案文件
52+
- `cn_dicts.zip`:中文词库
53+
- 'cn_dicts_cell.zip':中文词库(搜狗细胞词库)
54+
- `en_dicts.zip`:英文词库
55+
- `opencc.zip`:opencc 词库(emoji 等)
56+
- `all_dicts.zip`:以上四个词库的整合
57+
- `LICENSE.txt`:开源协议
58+
59+
tag_name: nightly
60+
name: "nightly build"
61+
make_latest: true
62+
files: |
63+
dist/*

.github/workflows/release.yml

Lines changed: 0 additions & 119 deletions
This file was deleted.

weasel.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ config_version: "2024-09-25"
2020
app_options:
2121
firefox.exe:
2222
inline_preedit: true # 行内显示预编辑区:规避 <https://github.com/rime/weasel/issues/946>
23-
# cmd.exe: # 带 .exe 的进程名:Weasel 15.0 及之前版本须小写
24-
# ascii_mode: true # 英文模式
25-
# conhost.exe:
26-
# ascii_mode: true
27-
# windowsterminal.exe:
28-
# ascii_mode: true
29-
# wt.exe:
30-
# ascii_mode: true
31-
# pwsh.exe:
32-
# ascii_mode: true
33-
# powershell.exe:
34-
# ascii_mode: true
35-
# mintty.exe:
36-
# ascii_mode: true
37-
# nvim-qt.exe:
38-
# ascii_mode: true
39-
# vim_mode: true # vim 模式, Esc <C-c> <C-[> 切换到 ascii 状态
23+
cmd.exe: # 带 .exe 的进程名:Weasel 15.0 及之前版本须小写
24+
ascii_mode: true # 英文模式
25+
conhost.exe:
26+
ascii_mode: true
27+
windowsterminal.exe:
28+
ascii_mode: true
29+
wt.exe:
30+
ascii_mode: true
31+
pwsh.exe:
32+
ascii_mode: true
33+
powershell.exe:
34+
ascii_mode: true
35+
mintty.exe:
36+
ascii_mode: true
37+
nvim-qt.exe:
38+
ascii_mode: true
39+
vim_mode: true # vim 模式, Esc <C-c> <C-[> 切换到 ascii 状态
4040
# [End of <app_options>]
4141

4242
# [global settings]

0 commit comments

Comments
 (0)