-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.02 KB
/
release.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
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
- edited
- prereleased
- released
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
}