Skip to content

Commit 9d4d6ae

Browse files
committed
add publishPipeline.yml
1 parent 650d97e commit 9d4d6ae

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: published
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v2
15+
with:
16+
dotnet-version: 8.0.x
17+
18+
- name: Get current release version
19+
id: version
20+
uses: pozetroninc/github-action-get-latest-release@master
21+
with:
22+
repository: Star-Academy/Summer1404-SE-Team03
23+
24+
- name: Build library and generate NuGet Package
25+
run: dotnet pack -c Release -o artifacts -p:PackageVersion=${{ steps.version.outputs.release }}
26+
working-directory: ./Phase03/
27+
28+
- name: Publish NuGet Package
29+
run: dotnet nuget push ./**/*.nupkg -k ${{ secrets.NUGET_API_KEY_NEW }} -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)