forked from Mintimate/oh-my-rime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cnb.yml
More file actions
78 lines (78 loc) · 3.76 KB
/
.cnb.yml
File metadata and controls
78 lines (78 loc) · 3.76 KB
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
main:
push:
- stages:
- name: release clean
image: docker.cnb.cool/cnb/plugins/cnbcool/release-clean:latest
settings:
filter: "RECENT_N=0"
debug: false
- name: 删除最新标签
script: git push origin --delete latest
- name: 重新制作标签
script: git tag -fa latest -m "latest" && git push origin latest
$:
tag_push:
# 上传二进制包到 release 附件
- docker:
build: .ide/Dockerfile
imports:
- https://cnb.cool/Mintimate/secret/-/blob/main/SyncToGitHub.yml
stages:
- name: 更新日志
image: cnbcool/changelog
settings:
day: 60
exports:
latestChangeLog: LATEST_CHANGE_LOG
- name: 创建发布标签
type: git:release
options:
title: latest
description: ${LATEST_CHANGE_LOG}
- name: 打包为zip包
script: find ./ -type f ! -name ".*" ! -path "*/.git/*" -exec zip oh-my-rime.zip {} +
- name: 下载上游客户端
script:
# 下载 weasel .exe 文件并设置输出变量
- weasel_url=$(curl -sL -H "Authorization:\ Bearer ${GIT_PUBLIC_ACCESS_TOKEN}" https://api.github.com/repos/rime/weasel/releases/latest | grep -Eo 'https://[^"]+\.exe' | head -1)
- weasel_file=$(basename "$weasel_url")
- curl -LO "$weasel_url"
- mv "$weasel_file" weasel-installer-latest.exe
- echo "##[set-output weasel_file=$(echo "$weasel_file")]"
# 下载 squirrel .pkg 文件并设置输出变量
- squirrel_url=$(curl -sL -H "Authorization:\ Bearer ${GIT_PUBLIC_ACCESS_TOKEN}" https://api.github.com/repos/rime/squirrel/releases/latest | grep -Eo 'https://[^"]+\.pkg' | head -1)
- squirrel_file=$(basename "$squirrel_url")
- curl -LO "$squirrel_url"
- mv "$squirrel_file" Squirrel-latest.pkg
- echo "##[set-output squirrel_file=$(echo "$squirrel_file")]"
# 下载 Fctix5-macOS installer 文件并设置输出变量
- fctix5_macOS_url=$(curl -sL -H "Authorization:\ Bearer ${GIT_PUBLIC_ACCESS_TOKEN}" https://api.github.com/repos/fcitx-contrib/fcitx5-macos-installer/releases/latest | grep -Eo 'https://[^"]+Rime.zip' | head -1)
- fctix5_macOS_file=$(basename "$fctix5_macOS_url")
- curl -LO "$fctix5_macOS_url" -o "$(basename "$fctix5_macOS_url")"
- echo "##[set-output fctix5_macOS_file=$(echo "$fctix5_macOS_file")]"
# 下载 万象语言模型 文件并设置输出变量
- wanxiang_url=$(curl -sL -H "Authorization:\ Bearer ${GIT_PUBLIC_ACCESS_TOKEN}" https://api.github.com/repos/amzxyz/RIME-LMDG/releases/tags/LTS | grep -Eo 'https://[^"]+\.gram' | head -1)
- wanxiang_file=$(basename "$wanxiang_url")
- curl -LO "$wanxiang_url" -o “$wanxiang_file”
- echo "##[set-output wanxiang_file=$(echo "$wanxiang_file")]"
exports:
weasel_file: weasel_file
squirrel_file: squirrel_file
fctix5_macOS_file: fctix5_macOS_file
wanxiang_file: wanxiang_file
- name: 自动打包在线方案包
image: docker.cnb.cool/mintimate/rime/deploy-schema
settings:
user_recipe_list: 'Mintimate/oh-my-rime:plum/full'
package_items: 'build opencc lua'
zip_file: oh-my-rime-online.zip
- name: release 上传附件
image: cnbcool/attachments:latest
settings:
attachments:
- oh-my-rime.zip
- weasel-installer-latest.exe
- Squirrel-latest.pkg
- Fcitx5-Rime.zip
- $wanxiang_file
- oh-my-rime-online.zip