-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (39 loc) · 1.11 KB
/
release.yml
File metadata and controls
42 lines (39 loc) · 1.11 KB
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
name: Release
on:
release:
types: [published]
jobs:
build_test_pack:
name: Build, test & pack
runs-on: windows-latest
env:
buildConfiguration: release
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration $env:buildConfiguration
- name: Test
run: dotnet test --no-build --configuration $env:buildConfiguration
- name: Pack
run: dotnet pack --no-build --configuration $env:buildConfiguration
- name: Archive artifacts
uses: actions/upload-artifact@v6
with:
name: packages
path: artifacts/*.nupkg
retention-days: 2
publish:
name: Publish
needs: build_test_pack
runs-on: windows-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: packages
- name: Publish packages
run: dotnet nuget push *.nupkg --source 'nuget.org' --skip-duplicate -k ${{ secrets.NugetAuthToken }}