Skip to content

Commit d58e806

Browse files
authored
Merge pull request #454 from UnrealMultiple/riips
Riips
2 parents 1db3a33 + 69d6ace commit d58e806

File tree

4 files changed

+133
-389
lines changed

4 files changed

+133
-389
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: 插件构建发布
22

3-
on: [push, pull_request]
4-
3+
on:
4+
push:
5+
tags-ignore:
6+
- V1.0.0.0
7+
pull_request:
8+
59
jobs:
610
Build:
711
runs-on: ubuntu-latest
@@ -93,10 +97,10 @@ jobs:
9397
body: |
9498
# 插件下载和更新日志
9599
### 📅 每次仓库更新,我们都会在这里发布最新的Release。请注意,这个仓库只有一个Release,所以你总是能在这里找到最新的版本。
96-
### 📖文档已经以PDF的形式附在插件包中。更推荐你直接在仓库主页中的[插件列表](https://github.com/UnrealMultiple/TShockPlugin?tab=readme-ov-file#%E5%B7%B2%E6%94%B6%E9%9B%86%E6%8F%92%E4%BB%B6),点击插件名跳转到每个插件的详细文档
100+
### 📖介绍已经以MD的形式附在插件包中,可以使用文本编辑器打开。更推荐你直接在仓库主页中的[插件列表](https://github.com/UnrealMultiple/TShockPlugin?tab=readme-ov-file#%E5%B7%B2%E6%94%B6%E9%9B%86%E6%8F%92%E4%BB%B6),点击插件名跳转
97101
### 📦 你可以在页面的`最底部↓↓↓`找到插件包的下载链接。下载完成后,你需要使用`ZIP压缩工具`进行解压。
98102
> [!CAUTION]
99-
>**请你`详细`的看`上面的说明`,不要到处问`插件怎么用`、`ZIP如何解压`、`PDF怎么打开`**
103+
>**请你`仔细`地阅读`上面的说明`,不要到处问`插件怎么用`、`ZIP如何解压`**
100104
<details>
101105
<summary>更新日志</summary>
102106
@@ -117,17 +121,21 @@ jobs:
117121
git config --local user.name "GitHub Action"
118122
$Changed = [System.Object[]]::new(0)
119123
foreach ($p in @(Get-ChildItem src/**/*.csproj)) {
120-
$pot = [System.IO.Path]::Combine($p.DirectoryName, "i18n", "template.pot")
121-
New-Item -Path $p.DirectoryName -Name i18n -ItemType Directory
122-
dotnet tool run GetText.Extractor -u -o -s $p.FullName -t $pot
123-
$d = $(git diff --numstat $pot).Split()
124-
if ($d[0] -le 2 -and $d[1] -le 2) {
125-
git checkout $pot
126-
} else {
127-
foreach ($t in @(Get-ChildItem $($p.DirectoryName)i18n/*.po)) {
128-
msgmerge --previous --update $t $pot
129-
}
124+
$pot = [System.IO.Path]::Combine($p.DirectoryName, "i18n", "template.pot")
125+
New-Item -Path $p.DirectoryName -Name i18n -ItemType Directory -Force
126+
dotnet tool run GetText.Extractor -u -o -s $p.FullName -t $pot
127+
}
128+
git add -N src/**/i18n/*.pot
129+
foreach ($p in @((git diff --numstat).Split([System.Environment]::NewLine))) {
130+
if (!$p.EndsWith(".pot")) { continue }
131+
$d = $p.Split("`t")
132+
if ($d[0] -le 2 -and $d[1] -le 2) {
133+
git checkout $d[2]
134+
} else {
135+
foreach ($t in @(Get-ChildItem $([System.IO.Path]::GetDirectoryName($d[2]))*.po)) {
136+
msgmerge --previous --update $t $d[2]
130137
}
138+
}
131139
}
132140
git diff --quiet
133141
if ($LastExitCode -ne 0) {
@@ -145,9 +153,11 @@ jobs:
145153
git push
146154
}
147155
148-
- name: 同步Gitee
156+
- name: 同步其他平台
149157
continue-on-error: true
150158
shell: pwsh
151159
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'UnrealMultiple/TShockPlugin'
152160
run: |
153-
python scripts/GiteeSync.py ${{ secrets.CAI_GITEE_TOKEN }}
161+
sudo pip install beautifulsoup4
162+
python scripts/GiteeSync.py ${{ secrets.CAI_GITEE_TOKEN }}
163+
sudo python scripts/ForumHelper.py Cai ${{ secrets.MONIKA_TR_PASSWORD }}

.github/workflows/forum_update.yml

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

0 commit comments

Comments
 (0)