4 Commits

Author SHA1 Message Date
Yue-bin
8d7d08b99e ci: 正确的仓库
All checks were successful
Publish Release / build (push) Successful in 1m3s
2026-02-19 18:46:31 +08:00
Yue-bin
8262b70292 ci(gitea): 固定 workflow action 版本以提高安全性
Some checks failed
Publish Release / build (push) Failing after 3s
将 actions/checkout 和 actions/setup-dotnet 从浮动版本标签
更新为固定的提交哈希和特定版本号,防止潜在的安全风险并
确保 CI/CD 构建的可重复性。
2026-02-19 18:39:06 +08:00
Yue-bin
652693883b ci: 添加 Gitea Actions 自动发布工作流
Some checks failed
Publish Release / build (push) Failing after 4s
配置 Gitea Actions 工作流实现 .NET 项目自动化发布:
- 监听 v 开头标签触发构建任务
- 使用 .NET 8.0 构建 Release 版本
- 自动创建 Gitea Release 并上传 stick.plugins DLL 文件
- 智能识别 alpha/beta/rc 标签并标记为预发布版本
2026-02-19 18:30:49 +08:00
Yue-bin
8261d243e6 chore(playermanager): 更新版本号至 3.1.1 2026-02-19 17:35:59 +08:00
2 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
name: Publish Release
on:
push:
tags:
- 'v*' # 匹配 v 开头的标签,如 v1.0.0
# 或者使用 '*' 匹配所有标签
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: http://MonBianG.lan:3000/action/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET
uses: http://MonBianG.lan:3000/action/setup-dotnet@v4.3.0
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
# 使用 Gitea Release Action 创建 Release
- name: Create Release
uses: http://MonBianG.lan:3000/action/gitea-release-action@main
with:
# 使用推送的标签名作为版本号
tag: ${{ github.ref_name }}
# 自动从标签名生成 Release 标题
name: Release ${{ github.ref_name }}
# 使用提交信息或自定义发布说明
body: |
## Changes in ${{ github.ref_name }}
Auto-generated release for tag ${{ github.ref_name }}.
# 上传构建产物
files: |
./bin/Release/net35/stick.plugins.*.dll
# 是否为预发布版本(如果是 alpha/beta/rc 标签)
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}

View File

@@ -4,7 +4,7 @@
<TargetFramework>net35</TargetFramework>
<AssemblyName>stick.plugins.playermanager</AssemblyName>
<Product>PlayerManager</Product>
<Version>3.1.0</Version>
<Version>3.1.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>