Skip to content

Commit 54065f8

Browse files
committed
添加更多平台的发布
1 parent 54c7291 commit 54065f8

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

.github/workflows/NuGet-tag-publish-MediaConverters.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: windows-latest
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v4
1515

1616
- name: Install dotnet tool
1717
run: dotnet tool install -g dotnetCampus.TagToVersion
@@ -40,3 +40,47 @@ jobs:
4040
run: |
4141
dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
4242
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

Comments
 (0)