Skip to content

Deploy Package

Deploy Package #1

name: Deploy Package
on:
push:
branches:
- 'main'
jobs:
deploy:
name: Deploy Package
runs-on: windows-2022
environment: Production
steps:
- name: Download Artifact
run: |
repo="${{ github.repository }}"
workflow="build_and_test.yml"
artifact="nuget"
run_id=`gh run --repo ${repo} list --workflow ${workflow} --json databaseId --jq .[0].databaseId`
gh run --repo ${repo} download ${run_id} -n ${artifact}
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Publish NuGet Package
run: |
dotnet nuget push *.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
shell: pwsh