Skip to content

Commit 3e99b85

Browse files
committed
Update nuget workflow to allow manual release
1 parent a912fed commit 3e99b85

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/Nuget-publishing.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ on:
1212
- "AUTHORS.TXT"
1313
- "CHANGELOG"
1414
- "COPYING"
15+
workflow_dispatch:
16+
inputs:
17+
forceRelease:
18+
description: 'Force release'
19+
required: false
20+
default: ''
21+
type: choice
22+
options:
23+
- '0'
24+
- '1'
1525

1626
permissions:
1727
packages: write
@@ -425,13 +435,15 @@ jobs:
425435
with:
426436
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
427437

438+
# We always reach billing limit, allow it fails
428439
- name: 📦 Publish to Github Packages
429-
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')
440+
if: (inputs.forceRelease != '' && inputs.forceRelease == 1) || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v'))
441+
continue-on-error: true
430442
working-directory: bindings/dotnet/UnicornEngine
431443
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
432444

433445
- name: 📦 Publish Nuget package
434-
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')
446+
if: (inputs.forceRelease != '' && inputs.forceRelease == 1) || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v'))
435447
working-directory: bindings/dotnet/UnicornEngine
436448
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json
437449
env:

0 commit comments

Comments
 (0)