Skip to content

Commit fc794e0

Browse files
committed
[增加]1. 增加发布Release版本信息
1 parent b9881b6 commit fc794e0

3 files changed

Lines changed: 43 additions & 202 deletions

File tree

.github/workflows/publish-nuget.yml

Lines changed: 0 additions & 201 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup .NET Core
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: 8.0.300
19+
20+
- name: Install dotnet tool
21+
run: dotnet tool install -g dotnetCampus.TagToVersion
22+
23+
- name: Set tag to version
24+
run: dotnet TagToVersion -t ${{ github.ref }} -f Version.props
25+
26+
- name: Install dependencies
27+
run: dotnet restore
28+
29+
- name: Build
30+
run: dotnet build --configuration Release --no-restore
31+
32+
- name: Publish To Nuget
33+
run: dotnet nuget push ./bin/app/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
34+
35+
- name: Release
36+
uses: ncipollo/release-action@v1
37+
with:
38+
generateReleaseNotes: true
39+
allowUpdates: true
40+
makeLatest: false
41+
tag: ${{ steps.get-tag.outputs.tag }}
42+
token: ${{ secrets.GITHUB_TOKEN }}

Server.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2929
gameframex.key.snk = gameframex.key.snk
3030
Version.props = Version.props
3131
README.md = README.md
32-
.github\workflows\publish-nuget.yml = .github\workflows\publish-nuget.yml
32+
.github\workflows\publish-release.yml = .github\workflows\publish-release.yml
3333
EndProjectSection
3434
EndProject
3535
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameFrameX.Tests", "Tests\GameFrameX.Tests\GameFrameX.Tests.csproj", "{762F0E9F-813B-40BD-B488-A7A6919A534E}"

0 commit comments

Comments
 (0)