Publish package #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |