Skip to content

Commit a7245df

Browse files
authored
Merge pull request #2 from MHIZokuchi/feat/nugget
Generate CI CD deployment file
2 parents a49546f + 75adba3 commit a7245df

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: '6.0.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Build
24+
run: dotnet build --configuration Release --no-restore
25+
26+
- name: Test
27+
run: dotnet test --no-restore --verbosity normal
28+
29+
- name: Pack
30+
run: dotnet pack --configuration Release --no-build --output nupkgs
31+
32+
- name: Push to NuGet
33+
run: dotnet nuget push "./nupkgs/*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)