Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish MediaConverters NuGet | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
PackOnWindows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dotnet tool | |
run: dotnet tool install -g dotnetCampus.TagToVersion | |
- name: Set tag to version | |
run: dotnet TagToVersion -t ${{ github.ref }} | |
- name: Build with dotnet | |
run: dotnet build --configuration Release src\MediaConverters\MediaConverters.sln | |
- name: Pack MediaConverters.Tool.ContextNuGet | |
run: dotnet pack --no-build true --configuration Release src\MediaConverters\MediaConverters.Tool.ContextNuGet\MediaConverters.Tool.ContextNuGet.csproj | |
- name: Publish and Pack win-x86 | |
run: | | |
dotnet publish -c Release -r win-x86 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj | |
dotnet pack --configuration Release /p:RuntimeIdentifier=win-x86 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj | |
- name: Publish and Pack win-x64 | |
run: | | |
dotnet publish -c Release -r win-x64 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj | |
dotnet pack --configuration Release /p:RuntimeIdentifier=win-x64 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj | |
- name: Push generated package to NuGet | |
run: | | |
dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }} | |
dotnet nuget push .\bin\Release\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000 | |
PackOnWindowsArm64: | |
runs-on: windows-11-arm | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dotnet tool | |
run: dotnet tool install -g dotnetCampus.TagToVersion | |
- name: Set tag to version | |
run: dotnet TagToVersion -t ${{ github.ref }} | |
- name: Build with dotnet | |
run: dotnet build --configuration Release src\MediaConverters\MediaConverters.sln | |
- name: Publish and Pack win-arm64 | |
run: | | |
dotnet publish -c Release -r win-arm64 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj | |
dotnet pack --configuration Release /p:RuntimeIdentifier=win-arm64 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj | |
- name: Push generated package to NuGet | |
run: | | |
dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }} | |
dotnet nuget push .\bin\Release\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000 | |
PackOnLinuxX64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dotnet tool | |
run: dotnet tool install -g dotnetCampus.TagToVersion | |
- name: Set tag to version | |
run: dotnet TagToVersion -t ${{ github.ref }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
9.0.x | |
- name: Build with dotnet | |
run: dotnet build --configuration Release src/MediaConverters/MediaConverters.sln | |
- name: Publish and Pack linux-x64 | |
run: | | |
dotnet publish -c Release -r linux-x64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj | |
dotnet pack --configuration Release /p:RuntimeIdentifier=linux-x64 src/MediaConverters/MediaConverters.Tool.RuntimeNuGet/MediaConverters.Tool.RuntimeNuGet.csproj | |
- name: Push generated package to NuGet | |
run: | | |
dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }} | |
dotnet nuget push ./bin/Release/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000 | |
PackOnLinuxArm64: | |
runs-on: ubuntu-24.04-arm | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dotnet tool | |
run: dotnet tool install -g dotnetCampus.TagToVersion | |
- name: Set tag to version | |
run: dotnet TagToVersion -t ${{ github.ref }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
3.1.x | |
5.0.x | |
6.0.x | |
9.0.x | |
- name: Build with dotnet | |
run: dotnet build --configuration Release src/MediaConverters/MediaConverters.sln | |
- name: Publish and Pack linux-arm64 | |
run: | | |
dotnet publish -c Release -r linux-arm64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj | |
dotnet pack --configuration Release /p:RuntimeIdentifier=linux-arm64 src/MediaConverters/MediaConverters.Tool.RuntimeNuGet/MediaConverters.Tool.RuntimeNuGet.csproj | |
- name: Push generated package to NuGet | |
run: | | |
dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }} | |
dotnet nuget push ./bin/Release/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000 |