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"
|
- "AUTHORS.TXT"
|
||||||
- "CHANGELOG"
|
- "CHANGELOG"
|
||||||
- "COPYING"
|
- "COPYING"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
forceRelease:
|
||||||
|
description: 'Force release'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- '0'
|
||||||
|
- '1'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
@@ -425,13 +435,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
|
path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg
|
||||||
|
|
||||||
|
# We always reach billing limit, allow it fails
|
||||||
- name: 📦 Publish to Github Packages
|
- 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
|
working-directory: bindings/dotnet/UnicornEngine
|
||||||
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
|
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}"
|
||||||
|
|
||||||
- name: 📦 Publish Nuget package
|
- 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
|
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
|
run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user