Skip to content

Commit 9a153a3

Browse files
committed
添加更多构建平台
1 parent 54065f8 commit 9a153a3

1 file changed

Lines changed: 65 additions & 1 deletion

File tree

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

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,37 @@ jobs:
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
4343
44-
PackOnLinux:
44+
PackOnWindowsArm64:
45+
46+
runs-on: windows-11-arm
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: Build with dotnet
58+
run: dotnet build --configuration Release src\MediaConverters\MediaConverters.sln
59+
60+
- name: Publish and Pack win-arm64
61+
run: |
62+
dotnet publish -c Release -r win-x64 src\MediaConverters\MediaConverters.Tool\MediaConverters.Tool.csproj
63+
dotnet pack --configuration Release /p:RuntimeIdentifier=win-x64 src\MediaConverters\MediaConverters.RuntimeNuGet\MediaConverters.RuntimeNuGet.csproj
64+
65+
- name: Add private GitHub registry to NuGet
66+
run: |
67+
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"
68+
69+
- name: Push generated package to NuGet
70+
run: |
71+
dotnet nuget push .\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
72+
dotnet nuget push .\bin\Release\*.nupkg -s github
73+
74+
PackOnLinuxX64:
4575

4676
runs-on: ubuntu-latest
4777

@@ -71,6 +101,40 @@ jobs:
71101
dotnet publish -c Release -r linux-x64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj
72102
dotnet pack --configuration Release /p:RuntimeIdentifier=linux-x64 src/MediaConverters/MediaConverters.RuntimeNuGet/MediaConverters.RuntimeNuGet.csproj
73103
104+
- name: Add private GitHub registry to NuGet
105+
run: |
106+
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"
107+
108+
- name: Push generated package to NuGet
109+
run: |
110+
dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
111+
dotnet nuget push ./bin/Release/*.nupkg -s github
112+
113+
PackOnLinuxArm64:
114+
115+
runs-on: ubuntu-24.04-arm
116+
117+
steps:
118+
- uses: actions/checkout@v4
119+
120+
- name: Install dotnet tool
121+
run: dotnet tool install -g dotnetCampus.TagToVersion
122+
123+
- name: Set tag to version
124+
run: dotnet TagToVersion -t ${{ github.ref }}
125+
126+
- name: Setup .NET
127+
uses: actions/setup-dotnet@v1
128+
with:
129+
dotnet-version: |
130+
3.1.x
131+
5.0.x
132+
6.0.x
133+
9.0.x
134+
135+
- name: Build with dotnet
136+
run: dotnet build --configuration Release src/MediaConverters/MediaConverters.sln
137+
74138
- name: Publish and Pack linux-arm64
75139
run: |
76140
dotnet publish -c Release -r linux-arm64 src/MediaConverters/MediaConverters.Tool/MediaConverters.Tool.csproj

0 commit comments

Comments
 (0)