Release publish #7
Workflow file for this run
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: Release publish | |
on: | |
workflow_dispatch: # Allow running the workflow manually from the GitHub UI | |
release: | |
types: | |
- published # Run the workflow when a new GitHub release is published | |
permissions: | |
security-events: write # required for CodeQL | |
packages: read | |
contents: read | |
actions: read | |
jobs: | |
build: | |
uses: ./.github/workflows/main.yml | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download packages | |
uses: actions/download-artifact@v4 | |
with: | |
path: packages | |
pattern: packages-windows-* | |
merge-multiple: true | |
- name: Publish NuGet package | |
shell: pwsh | |
run: | | |
foreach ($file in (Get-ChildItem ./packages/release -Recurse -Include *.nupkg)) { | |
echo "NuGet publish for file: '$file'" | |
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | |
} |