-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (36 loc) · 1.4 KB
/
nuget-push.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: NuGet Publish
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
dotnet build Flarum.Api/Flarum.Api.csproj -c Release --no-restore
dotnet build Flarum.Provider/Flarum.Provider.csproj -c Release --no-restore
dotnet build Flarum.Api.Test/Flarum.Provider.Test.csproj -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --verbosity normal
- name: Build NuGet Packages
run: |
dotnet pack Flarum.Api/Flarum.Api.csproj -c Release -o Packages/
dotnet pack Flarum.Provider/Flarum.Provider.csproj -c Release -o Packages/
- name: Publish Packages to Artifacts
uses: actions/[email protected]
with:
name: packages
path: Packages
- name: Publish To NuGet
run: |
dotnet nuget push "D:\a\Flarum.Sdk\Flarum.Sdk\Packages\*.nupkg" -k ${{ secrets.NUGET_KEY }} -s 'https://api.nuget.org/v3/index.json' --skip-duplicate