-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (50 loc) · 1.77 KB
/
release.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
name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore .\src\JiuLing.CommonLibs.sln
- name: Build
run: dotnet build .\src\JiuLing.CommonLibs.sln --no-restore -c release
- name: Test
run: dotnet test .\src\JiuLing.CommonLibs.sln
- name: Get version
uses: olegtarasov/[email protected]
id: tagName
- name: Create zip
shell: pwsh
# 配置【编译后的文件地址】
run: Compress-Archive -Path .\src\JiuLing.CommonLibs\bin\Release\* -DestinationPath .\src\JiuLing.CommonLibs\bin\Release\JiuLing.CommonLibs_${{ steps.tagName.outputs.tag }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
# 配置【README地址】
body: |
Release为自动生成,具体内容请查看提交日志,或直接查看[README](https://github.com/JiuLing-zhang/JiuLing.CommonLibs#readme)
# 配置【zip文件地址】
files: .\src\JiuLing.CommonLibs\bin\Release\JiuLing.CommonLibs_${{ steps.tagName.outputs.tag }}.zip
- name: Publish
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: src/JiuLing.CommonLibs/JiuLing.CommonLibs.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
TAG_COMMIT: false
INCLUDE_SYMBOLS: true