Skip to content

Commit 594da99

Browse files
committed
增加gitaction的配置
1 parent ea484c2 commit 594da99

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "build and publish to nuget"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
# set os
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# checkout souce code
17+
- uses: actions/checkout@v2
18+
19+
# install dotnet sdk
20+
- name: Setup .NET Core
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: 3.1.100
24+
25+
# build nuget packages
26+
- name: build_nuget_packages
27+
run: ./pack.ps1
28+
shell: pwsh
29+
working-directory: ./nupkg
30+
31+
# publish to nuget
32+
- name: publish_to_nuget
33+
env:
34+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
35+
run: ./push_packages.ps1
36+
shell: pwsh
37+
working-directory: ./nupkg

0 commit comments

Comments
 (0)