-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (30 loc) · 1.08 KB
/
publish-xunit.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
37
name: Publish Saucery.XUnit to NuGet
on:
workflow_dispatch:
env:
PROJECT_NAME: Saucery.XUnit
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
CONFIG: Release
NUPKG_DIR: out
NUGET_SOURCE: https://api.nuget.org/v3/index.json
jobs:
publish:
name: build, pack & push Saucery.XUnit
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
# Check for latest at link at .NET 8 download page (https://dotnet.microsoft.com/download/dotnet/8.0)
dotnet-version: 9.0.x
#dotnet-version: |
# 3.1.x
# 5.0.x
- name: Compile solution
run: dotnet build -c ${{ env.CONFIG }}
- name: Pack NuGet package
run: dotnet pack -c ${{ env.CONFIG }} ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj -o ${{ env.NUPKG_DIR }}
- name: Push generated package to NuGet
run: dotnet nuget push ${{ env.NUPKG_DIR }}/*.nupkg --source '${{ env.NUGET_SOURCE }}' --api-key ${{ env.NUGET_API_KEY }}