-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 2.3 KB
/
publish.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish
on:
push:
branches: [ master ]
paths:
- '.github/workflows/publish.yml'
- 'src/**'
- 'build/**'
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Run _build
run: >-
dotnet pack src/BUTR.CrashReport.Models/BUTR.CrashReport.Models.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport/BUTR.CrashReport.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Tool/BUTR.CrashReport.Tool.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Renderer.Html/BUTR.CrashReport.Renderer.Html.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Renderer.ImGui/BUTR.CrashReport.Renderer.ImGui.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Renderer.WinForms/BUTR.CrashReport.Renderer.WinForms.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Renderer.Zip/BUTR.CrashReport.Renderer.Zip.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Bannerlord.Source/BUTR.CrashReport.Bannerlord.Source.csproj --configuration Release -o "./packages";
dotnet pack src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj --configuration Release -o "./packages";
shell: pwsh
- name: Push to NuGet
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org
shell: pwsh
- name: Push to GPR
run: |
for f in ./packages/*.nupkg
do
curl -vX PUT -u "vslee:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/BUTR/
done
shell: bash