Upload pre-compiled binaries and libraries on release (#206)

This commit is contained in:
Fangjun Kuang
2023-07-10 17:59:08 +08:00
committed by GitHub
parent 4eacbed0b2
commit 0b5fa24134
10 changed files with 304 additions and 38 deletions

View File

@@ -6,6 +6,20 @@ on:
- dot-net
tags:
- '*'
release:
types:
- published
workflow_dispatch:
inputs:
release:
description: "Whether to release"
type: boolean
env:
RELEASE:
|- # Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency:
group: dot-net-${{ github.ref }}
@@ -133,3 +147,11 @@ jobs:
# API_KEY is valid until 2024.05.02
cd scripts/dotnet/packages
dotnet nuget push ./org.k2fsa.sherpa.onnx.*.nupkg --skip-duplicate --api-key $API_KEY --source https://api.nuget.org/v3/index.json
- name: Release nuget packages
if: env.RELEASE == 'true'
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
overwrite: true
file: scripts/dotnet/packages/*.nupkg