-
-
Notifications
You must be signed in to change notification settings - Fork 100
62 lines (50 loc) · 1.29 KB
/
release.yml
File metadata and controls
62 lines (50 loc) · 1.29 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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Publish UELib
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
publish:
runs-on: windows-2022
permissions:
packages: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore src/Eliot.UELib.csproj
- name: Build
run: dotnet build src/Eliot.UELib.csproj -c Release --no-restore
- name: Setup NBGV
uses: dotnet/nbgv@master
id: nbgv
- name: Pack
run: |
dotnet pack src/Eliot.UELib.csproj `
-c Release `
-o artifacts
shell: pwsh
- name: Push to NuGet
shell: pwsh
run: |
dotnet nuget push `
"artifacts/Eliot.UELib.${{ steps.nbgv.outputs.SemVer2 }}.nupkg" `
--api-key "${{ secrets.NUGET_API_KEY }}" `
--source "https://api.nuget.org/v3/index.json" `
--skip-duplicate
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: packages
path: artifacts/*.nupkg
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.nupkg
generate_release_notes: true