1+ name : Publish MediaConverters NuGet
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ PackOnWindows :
10+
11+ runs-on : windows-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Install dotnet tool
17+ run : dotnet tool install -g dotnetCampus.TagToVersion
18+
19+ - name : Set tag to version
20+ run : dotnet TagToVersion -t ${{ github.ref }}
21+
22+ - name : Build with dotnet
23+ run : dotnet build --configuration Release src\MediaConverters\MediaConverters.sln
24+
25+ - name : Pack MediaConverters.Tool.ContextNuGet
26+ run : dotnet pack --no-build true --configuration Release src\MediaConverters\MediaConverters.Tool.ContextNuGet\MediaConverters.Tool.ContextNuGet.csproj
27+
28+ - name : Pack DotNetCampus.MediaConverter.SkiaWmfRenderer
29+ run : dotnet pack --no-build true --configuration Release src\MediaConverters\SkiaWmfRenderer\src\SkiaWmfRenderer\SkiaWmfRenderer.csproj
30+
31+ - name : Publish and Pack win-x86
32+ run : |
33+ dotnet publish -c Release -r win-x86 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj
34+ dotnet pack --configuration Release /p:RuntimeIdentifier=win-x86 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj
35+
36+ - name : Publish and Pack win-x64
37+ run : |
38+ dotnet publish -c Release -r win-x64 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj
39+ dotnet pack --configuration Release /p:RuntimeIdentifier=win-x64 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj
40+
41+ - name : Push generated package to NuGet
42+ run : |
43+ dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
44+ dotnet nuget push .\bin\Release\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000
45+
46+ PackOnWindowsArm64 :
47+
48+ runs-on : windows-11-arm
49+
50+ steps :
51+ - uses : actions/checkout@v4
52+
53+ - name : Install dotnet tool
54+ run : dotnet tool install -g dotnetCampus.TagToVersion
55+
56+ - name : Set tag to version
57+ run : dotnet TagToVersion -t ${{ github.ref }}
58+
59+ - name : Build with dotnet
60+ run : dotnet build --configuration Release src\MediaConverters\MediaConverters.sln
61+
62+ - name : Publish and Pack win-arm64
63+ run : |
64+ dotnet publish -c Release -r win-arm64 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj
65+ dotnet pack --configuration Release /p:RuntimeIdentifier=win-arm64 src\MediaConverters\MediaConverters.Tool.RuntimeNuGet\MediaConverters.Tool.RuntimeNuGet.csproj
66+
67+ - name : Push generated package to NuGet
68+ run : |
69+ dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
70+ dotnet nuget push .\bin\Release\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000
71+
72+ PackOnLinuxX64 :
73+
74+ runs-on : ubuntu-latest
75+
76+ steps :
77+ - uses : actions/checkout@v4
78+
79+ - name : Install dotnet tool
80+ run : dotnet tool install -g dotnetCampus.TagToVersion
81+
82+ - name : Set tag to version
83+ run : dotnet TagToVersion -t ${{ github.ref }}
84+
85+ - name : Setup .NET
86+ uses : actions/setup-dotnet@v1
87+ with :
88+ dotnet-version : |
89+ 3.1.x
90+ 5.0.x
91+ 6.0.x
92+ 9.0.x
93+
94+ - name : Build with dotnet
95+ run : dotnet build --configuration Release src/MediaConverters/MediaConverters.sln
96+
97+ - name : Publish and Pack linux-x64
98+ run : |
99+ dotnet publish -c Release -r linux-x64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj
100+ dotnet pack --configuration Release /p:RuntimeIdentifier=linux-x64 src/MediaConverters/MediaConverters.Tool.RuntimeNuGet/MediaConverters.Tool.RuntimeNuGet.csproj
101+
102+ - name : Push generated package to NuGet
103+ run : |
104+ dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
105+ dotnet nuget push ./bin/Release/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000
106+
107+ PackOnLinuxArm64 :
108+
109+ runs-on : ubuntu-24.04-arm
110+
111+ steps :
112+ - uses : actions/checkout@v4
113+
114+ - name : Install dotnet tool
115+ run : dotnet tool install -g dotnetCampus.TagToVersion
116+
117+ - name : Set tag to version
118+ run : dotnet TagToVersion -t ${{ github.ref }}
119+
120+ - name : Setup .NET
121+ uses : actions/setup-dotnet@v1
122+ with :
123+ dotnet-version : |
124+ 3.1.x
125+ 5.0.x
126+ 6.0.x
127+ 9.0.x
128+
129+ - name : Build with dotnet
130+ run : dotnet build --configuration Release src/MediaConverters/MediaConverters.sln
131+
132+ - name : Publish and Pack linux-arm64
133+ run : |
134+ dotnet publish -c Release -r linux-arm64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj
135+ dotnet pack --configuration Release /p:RuntimeIdentifier=linux-arm64 src/MediaConverters/MediaConverters.Tool.RuntimeNuGet/MediaConverters.Tool.RuntimeNuGet.csproj
136+
137+ - name : Push generated package to NuGet
138+ run : |
139+ dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
140+ dotnet nuget push ./bin/Release/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }} --api-key ${{ secrets.GITHUB_TOKEN }} --timeout 3000
0 commit comments