forked from yiyungent/PluginCore
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.67 KB
/
PluginCore.IPlugins-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
name: PluginCore.IPlugins Release
on:
push:
tags:
- 'PluginCore.IPlugins-v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
# 为了让 git 有日志 (git log) 可寻,还得在检出的时候顺带把所有提交历史一并拉下来,指定 fetch-depth 就能做到
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.102
- name: Build
run: |
cd ./src/PluginCore.IPlugins
dotnet build --configuration Release
ls
ls ./bin/Release/
- name: Zip the Build
run: |
cd ./src/PluginCore.IPlugins/bin/Release
zip -r PluginCore.IPlugins-netstandard2.0.zip ./netstandard2.0/
cd ../../../../
mv ./src/PluginCore.IPlugins/bin/Release/*.zip ./
- name: Create temp-release-note.md
run: |
cp utils/generate-release-note.ps1 generate-release-note.ps1
$env:GitProjectTagName="PluginCore.IPlugins"
$env:GitProjectPath="src/PluginCore.IPlugins/*"
./generate-release-note.ps1
shell: pwsh
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
#tag_name: ${{ github.ref }}
#name: ${{ github.ref }}
# body: TODO New Release.
body_path: temp-release-note.md
draft: false
prerelease: false
files: |
PluginCore.IPlugins-netstandard2.0.zip
LICENSE
README.md