Skip to content

Publish NuGet

Publish NuGet #36

Workflow file for this run

name: Publish NuGet
on:
workflow_dispatch:
jobs:
Publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Download windows artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: windows.yml
name: packages_windows
- name: Download ubuntu artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: ubuntu22.yml
name: artifacts_ubuntu_22
- name: Download ubuntu arm artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: linux-arm.yml
name: artifacts_linux_arm
#- name: Download macos artifact
# uses: dawidd6/action-download-artifact@v6
# with:
# github_token: ${{secrets.GITHUB_TOKEN}}
# workflow: macos10.yml
# name: artifacts_macos_10
- name: Download wasm artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: wasm.yml
name: artifacts_wasm
- run: |
ls -l
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.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