-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.16 KB
/
publish-package.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
name: Publish package
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --verbosity normal
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.0
with:
name: build
path: Src/GbxToolAPI*/bin/Release/*.nupkg
publish:
name: Publish GbxToolAPI${{ matrix.lib }}
needs: build
strategy:
matrix:
lib: ['', .CLI, .Client, .Server]
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
uses: actions/download-artifact@v3.0.0
with:
name: build
- name: Publish GbxToolAPI${{ matrix.lib }} package to github.com
run: dotnet nuget push GbxToolAPI${{ matrix.lib }}/bin/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bigbang1112-cz/index.json --skip-duplicate