-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (33 loc) · 1 KB
/
publish-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
name: Pack and publish
on:
release:
types:
- published
jobs:
release-nugets:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dotnet8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Install deps
run: |
dotnet restore
- name: Build
run: |
dotnet build --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
- name: Pack
run: |
dotnet pack AppLibDotnet.sln --configuration Release --no-restore --no-build -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
- name: Versions
run: |
dotnet --version
- name: Publish
run: |
dotnet nuget push src/**/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}