Update nuget workflow to allow manual release
This commit is contained in:
16
.github/workflows/Nuget-publishing.yml
vendored
16
.github/workflows/Nuget-publishing.yml
vendored
@@ -12,6 +12,16 @@ on:
|
||||
- "AUTHORS.TXT"
|
||||
- "CHANGELOG"
|
||||
- "COPYING"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
forceRelease:
|
||||
description: 'Force release'
|
||||
required: false
|
||||
default: ''
|
||||
type: choice
|
||||
options:
|
||||
- '0'
|
||||
- '1'
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
@@ -425,13 +435,15 @@ jobs:
|
||||
with:
|
||||
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
|
||||
|
||||
# We always reach billing limit, allow it fails
|
||||
- name: 📦 Publish to Github Packages
|
||||
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')
|
||||
if: (inputs.forceRelease != '' && inputs.forceRelease == 1) || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v'))
|
||||
continue-on-error: true
|
||||
working-directory: bindings/dotnet/UnicornEngine
|
||||
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
|
||||
|
||||
- name: 📦 Publish Nuget package
|
||||
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')
|
||||
if: (inputs.forceRelease != '' && inputs.forceRelease == 1) || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v'))
|
||||
working-directory: bindings/dotnet/UnicornEngine
|
||||
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user