Skip to content

Publish package

Publish package #13

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/[email protected]
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/[email protected]
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