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