-
-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (45 loc) · 1.87 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (45 loc) · 1.87 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
name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Pack GeoUK
run: dotnet pack GeoUK/GeoUK.csproj -c Release /p:Version=${{ github.event.release.tag_name }} --no-restore
- name: Pack GeoUK.OSTN
run: dotnet pack GeoUK.OSTN/GeoUK.OSTN.csproj -c Release /p:Version=${{ github.event.release.tag_name }} --no-restore
- name: Upload GeoUK NuGet package
uses: actions/upload-artifact@v4
with:
name: GeoUK-nuget
path: GeoUK/bin/Release/IeuanWalker.GeoUK.${{ github.event.release.tag_name }}.nupkg
- name: Upload GeoUK.OSTN NuGet package
uses: actions/upload-artifact@v4
with:
name: GeoUK.OSTN-nuget
path: GeoUK.OSTN/bin/Release/IeuanWalker.GeoUK.OSTN.${{ github.event.release.tag_name }}.nupkg
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.1.1
# Get a short-lived NuGet API key
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: Ieuan
- name: Publish GeoUK to NuGet.org
run: nuget push GeoUK/bin/Release/IeuanWalker.GeoUK.${{ github.event.release.tag_name }}.nupkg --source 'https://api.nuget.org/v3/index.json' -ApiKey ${{steps.login.outputs.NUGET_API_KEY}}
- name: Publish GeoUK.OSTN to NuGet.org
run: nuget push GeoUK.OSTN/bin/Release/IeuanWalker.GeoUK.OSTN.${{ github.event.release.tag_name }}.nupkg --source 'https://api.nuget.org/v3/index.json' -ApiKey ${{steps.login.outputs.NUGET_API_KEY}}