Skip to content

update .net9

update .net9 #10

Workflow file for this run

name: 插件发布
on:
push:
branches: [ "master"]
jobs:
Build:
runs-on: ubuntu-latest
name: 构建插件
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: 初始化.NET 9
uses: actions/setup-dotnet@v4
env:
DOTNET_CLI_UI_LANGUAGE: zh-CN
with:
dotnet-version: 9.0.x
- name: 构建插件
run: |
dotnet build Plugin.sln -c Release
- name: 安装 zip
run: sudo apt-get install zip
- name: 生成压缩包
run: |
cd out
find . -type d -exec zip -r "../Plugins.zip" {} \;
- name: 上传临时插件包
uses: actions/upload-artifact@v4
with:
name: Plugins
path: Plugins.zip
LatestRelease:
name: 发布插件
runs-on: ubuntu-latest
needs: Build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 更新发布标签
run: |
git tag -f V1.0.0.0
git push -f origin V1.0.0.0
- name: 下载临时插件包
uses: actions/download-artifact@v4
with:
name: Plugins
path: ./bin
- name: 发布插件包
uses: ncipollo/release-action@v1
with:
tag: V1.0.0.0
name: "最新版本"
body: "# 插件下载和更新日志\n### 📅 每次仓库更新,我们都会在这里发布最新的Release。请注意,这个仓库只有一个Release,所以你总是能在这里找到最新的版本。\n### 📖文档已经以PDF的形式附在插件包中。更推荐你直接在仓库主页中的[插件列表](https://github.com/Controllerdestiny/TShockPlugin?tab=readme-ov-file#%E5%B7%B2%E6%94%B6%E9%9B%86%E6%8F%92%E4%BB%B6),点击插件名跳转到每个插件的详细文档。\n### 📦 你可以在页面的`最底部↓↓↓`找到插件包的下载链接。下载完成后,你需要使用`ZIP压缩工具`进行解压。\n> [!CAUTION]\n>**请你`详细`的看`上面的说明`,不要到处问`插件怎么用`、`ZIP如何解压`、`PDF怎么打开`**"
artifacts: |
./bin/*
allowUpdates: true
removeArtifacts: true
ClearTempArtifacts:
name: 清理临时文件
if: always()
runs-on: ubuntu-latest
needs:
- LatestRelease
permissions:
actions: write
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: |
Plugins