forked from Naoko-simple/Clash_Chinese_Patch
-
Notifications
You must be signed in to change notification settings - Fork 0
179 lines (163 loc) · 6.75 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: CI
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
inputs:
version:
description: '指定 Clash for Windows 的版本 (X.X.X)'
required: true
default: ''
type: string
jobs:
build:
name: Build
if: ${{ github.event_name == 'push' }}
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Clone BoyceLig/ClashSinicizationTool Repository
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
owner: 'BoyceLig'
repository: 'ClashSinicizationTool'
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Setup NuGet
shell: pwsh
run: |
cd ./ClashSinicizationTool
dotnet nuget update source
nuget restore ClashSinicizationTool.sln
- name: Build .NET App
shell: pwsh
run: |
cd ./ClashSinicizationTool
./build_cli.ps1 app
- name: Unpack ClashSinicizationTool & Copy Project Files
shell: pwsh
run: |
if (-not (Test-Path ./Build)) { New-Item -Path ./ -Name Build -ItemType Directory }
Copy-Item -Path ./ClashSinicizationTool/Dist/Release/ -Destination ./Build/ClashSinicizationTool/ -Recurse -Force
Copy-Item -Path ./翻译脚本.txt -Destination ./Build/ClashSinicizationTool/ -Force
Copy-Item -Path ./moment-with-CN.js -Destination ./Build/ClashSinicizationTool/ -Force
- name: Get Tag
id: get_tag
uses: dawidd6/action-get-tag@v1
- name: Download Clash for Windows
uses: robinraju/[email protected]
with:
repository: "Fndroid/clash_for_windows_pkg"
tag: ${{ steps.get_tag.outputs.tag }}
fileName: "Clash.for.Windows-${{ steps.get_tag.outputs.tag }}-win.7z"
tarBall: false
zipBall: false
out-file-path: "downloads"
- name: Unpack Clash for Windows & Sinicization
shell: pwsh
run: |
7z x ./downloads/Clash.for.Windows-${{ steps.get_tag.outputs.tag }}-win.7z -o"./Build/Clash"
./Build/ClashSinicizationTool/CLI.exe -c ./Build/Clash -t ./Build/ClashSinicizationTool/翻译脚本.txt -o ./Build
- name: Package Asar
shell: pwsh
run: |
7z a -mx9 "./Build/app.7z" "./Build/app.asar"
Compress-Archive -Path "./Build/app.asar" -DestinationPath "./Build/app.zip"
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Clash for Windows v${{ steps.get_tag.outputs.tag }} 汉化补丁
prerelease: false
draft: false
artifacts: "./Build/app.7z,./Build/app.zip"
body: |
[![](https://img.shields.io/badge/Channel-blue?label=Telegram&logo=telegram)](https://t.me/ClashR_for_Windows_Channel) [![](https://img.shields.io/badge/Group-green?label=Telegram&logo=telegram)](https://t.me/+Se4RSc06w8QK1HiS)
⚠️汉化永久免费,请注意欺诈!!!
## 汉化方法:
下载 `app.7z` 或 `app.zip` 文件(*两个压缩包内容一样*)后,解压压缩包,请自行替换下列路径中的 `app.asar` 文件
`Clash for Windows\resources\app.asar`
## 相关推荐:
### 相关推荐1:OK加速
8.8折优惠卷码:clash
[OK加速](http://zhuri.cc/auth/register?code=F9B0)
[TG群组一键直达](https://t.me/zhuricc)
[TG公告板一键直达](https://t.me/okjiasuqi)
特色属性:
✅不限速,不限时。
✅使用不满意随时🉑退款!!!
✅尊重用户隐私,不保留用户使用记录!!!
✅免费提供Netflix高级视频会员账号。
✅免费提供iOS美区id内含小火箭/圈X等多款付费软件。
购买小火箭、Google voice👉[神马杂货铺](https://googlevoice.top/)
### 相关推荐2:Cherry VPN
8折优惠卷:clash
[Cherry VPN 官网](https://cherryvpn.net/auth/register?code=EO50)
[讨论组](https://t.me/cherrylink_vpn)
[公告板直达](https://t.me/cherrylink_channel)
特色属性:
✅全SS隧道中转节点.
✅轻松带你畅游世界。
✅使用不满意随时🉑退款!!!
✅尊重用户隐私,不保留用户使用记录!!!
manual:
name: Manual
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: true
- name: Clone BoyceLig/ClashSinicizationTool Repository
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
owner: 'BoyceLig'
repository: 'ClashSinicizationTool'
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Setup NuGet
shell: pwsh
run: |
cd ./ClashSinicizationTool
dotnet nuget update source
nuget restore ClashSinicizationTool.sln
- name: Build .NET App
shell: pwsh
run: |
cd ./ClashSinicizationTool
./build_cli.ps1 app
- name: Unpack ClashSinicizationTool & Copy Project Files
shell: pwsh
run: |
if (-not (Test-Path ./Build)) { New-Item -Path ./ -Name Build -ItemType Directory }
Copy-Item -Path ./ClashSinicizationTool/Dist/Release/ -Destination ./Build/ClashSinicizationTool/ -Recurse -Force
Copy-Item -Path ./翻译脚本.txt -Destination ./Build/ClashSinicizationTool/ -Force
Copy-Item -Path ./moment-with-CN.js -Destination ./Build/ClashSinicizationTool/ -Force
- name: Download Clash for Windows
uses: robinraju/[email protected]
with:
repository: "Fndroid/clash_for_windows_pkg"
tag: ${{ inputs.version }}
fileName: "Clash.for.Windows-${{ inputs.version }}-win.7z"
tarBall: false
zipBall: false
out-file-path: "downloads"
- name: Unpack Clash for Windows & Sinicization
shell: pwsh
run: |
7z x ./downloads/Clash.for.Windows-${{ inputs.version }}-win.7z -o"./Build/Clash"
./Build/ClashSinicizationTool/CLI.exe -c ./Build/Clash -t ./Build/ClashSinicizationTool/翻译脚本.txt -o ./Build
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: app-${{ inputs.version }}
path: ./Build/app.asar