11
11
runs-on : windows-latest
12
12
13
13
steps :
14
- - uses : actions/checkout@v1
14
+ - uses : actions/checkout@v4
15
15
16
16
- name : Install dotnet tool
17
17
run : dotnet tool install -g dotnetCampus.TagToVersion
40
40
run : |
41
41
dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
42
42
dotnet nuget push .\bin\Release\*.nupkg -s github
43
+
44
+ PackOnLinux :
45
+
46
+ runs-on : ubuntu-latest
47
+
48
+ steps :
49
+ - uses : actions/checkout@v4
50
+
51
+ - name : Install dotnet tool
52
+ run : dotnet tool install -g dotnetCampus.TagToVersion
53
+
54
+ - name : Set tag to version
55
+ run : dotnet TagToVersion -t ${{ github.ref }}
56
+
57
+ - name : Setup .NET
58
+ uses : actions/setup-dotnet@v1
59
+ with :
60
+ dotnet-version : |
61
+ 3.1.x
62
+ 5.0.x
63
+ 6.0.x
64
+ 9.0.x
65
+
66
+ - name : Build with dotnet
67
+ run : dotnet build --configuration Release src/MediaConverters/MediaConverters.sln
68
+
69
+ - name : Publish and Pack linux-x64
70
+ run : |
71
+ dotnet publish -c Release -r linux-x64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj
72
+ dotnet pack --configuration Release /p:RuntimeIdentifier=linux-x64 src/MediaConverters/MediaConverters.RuntimeNuGet/MediaConverters.RuntimeNuGet.csproj
73
+
74
+ - name : Publish and Pack linux-arm64
75
+ run : |
76
+ dotnet publish -c Release -r linux-arm64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj
77
+ dotnet pack --configuration Release /p:RuntimeIdentifier=linux-arm64 src/MediaConverters/MediaConverters.RuntimeNuGet/MediaConverters.RuntimeNuGet.csproj
78
+
79
+ - name : Add private GitHub registry to NuGet
80
+ run : |
81
+ dotnet nuget add source --username dotnet-campus --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/dotnet-campus/index.json"
82
+
83
+ - name : Push generated package to NuGet
84
+ run : |
85
+ dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
86
+ dotnet nuget push ./bin/Release/*.nupkg -s github
0 commit comments