Skip to content

Publish NuGet

Publish NuGet #31

Workflow file for this run

name: Publish NuGet
on:
workflow_dispatch:
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download windows artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: windows.yml
name: packages_windows
- name: Download ubuntu artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: ubuntu20.yml
name: artifacts_ubuntu_20
- name: Download ubuntu arm artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: linux-arm.yml
name: artifacts_linux_arm
#- name: Download macos artifact
# uses: dawidd6/action-download-artifact@v2
# with:
# github_token: ${{secrets.GITHUB_TOKEN}}
# workflow: macos10.yml
# name: artifacts_macos_10
- name: Download wasm artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: wasm.yml
name: artifacts_wasm
- run: |
ls -l
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Rename
run: |
for f in $(find $PWD -maxdepth 1 -regex ".+\.s?nupkg"); do
dotnet run --project tool/OpenCvSharp.NupkgBetaRemover --configuration Release -- "$f"
done
- name: Push to nuget.org
run: |
dotnet nuget push "*.nupkg" -k ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push "*.snupkg" -k ${{secrets.NUGET_ORG_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate