-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.33 KB
/
publish.yml
File metadata and controls
49 lines (40 loc) · 1.33 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
43
44
45
46
47
48
49
name: Publish
on:
release:
types:
- published
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.x
- name: Restore dependencies
run: dotnet restore
- name: Pack LightObjects
run: |
dotnet build ./src/LightObjects/LightObjects.csproj --configuration Release --no-restore
dotnet pack ./src/LightObjects/LightObjects.csproj --configuration Release --no-build --output .
- name: Pack LightObjects.Generated
run: |
dotnet build ./src/LightObjects.Generated/LightObjects.Generated.csproj --configuration Release --no-restore
dotnet pack ./src/LightObjects.Generated/LightObjects.Generated.csproj --configuration Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate