Skip to content

Commit eadcd9d

Browse files
committed
Revert "删除其他干扰项提高打包速度减少成本"
This reverts commit b9e3a08.
1 parent 74de4b9 commit eadcd9d

5 files changed

Lines changed: 264 additions & 3 deletions

File tree

.github/workflows/MediaConverters.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup dotnet
3838
uses: actions/setup-dotnet@v4
3939
with:
40-
dotnet-version: |
40+
dotnet-version: |
4141
9.0.x
4242
4343
- name: Publish and Pack linux-arm64
@@ -51,5 +51,3 @@ jobs:
5151
name: linux-arm64
5252
path: bin/Release/
5353
retention-days: 1
54-
55-
# dotnet nuget push ./bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NugetKey }}
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: publish nuget
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
11+
runs-on: windows-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: |
20+
3.1.x
21+
5.0.x
22+
6.0.x
23+
24+
- name: Install dotnet tool
25+
run: dotnet tool install -g dotnetCampus.TagToVersion
26+
27+
- name: Set tag to version
28+
run: dotnet TagToVersion -t ${{ github.ref }}
29+
30+
- name: Build with dotnet
31+
run: dotnet build --configuration Release
32+
33+
- name: Pack with dotnet
34+
run: dotnet pack --configuration Release --no-build
35+
36+
- name: Install Nuget
37+
uses: nuget/setup-nuget@v1
38+
with:
39+
nuget-version: '5.x'
40+
41+
- name: Add private GitHub registry to NuGet
42+
run: |
43+
nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Push generated package to GitHub registry
46+
run: |
47+
nuget push .\bin\Release\*.nupkg -Source github -SkipDuplicate
48+
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbols
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Code format check
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
dotnet-format:
9+
runs-on: windows-latest
10+
steps:
11+
12+
- name: Checkout repo
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.head_ref }}
16+
17+
# 代码文件编码规范机器人,详细请看 [dotnet 在 GitHub 的 Action 上部署自动代码编码规范机器人](https://blog.lindexi.com/post/dotnet-%E5%9C%A8-GitHub-%E7%9A%84-Action-%E4%B8%8A%E9%83%A8%E7%BD%B2%E8%87%AA%E5%8A%A8%E4%BB%A3%E7%A0%81%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E6%9C%BA%E5%99%A8%E4%BA%BA.html)
18+
- name: Install dotnetCampus.EncodingNormalior
19+
run: dotnet tool update -g dotnetCampus.EncodingNormalior
20+
21+
- name: Fix encoding
22+
run: EncodingNormalior -f . --TryFix true
23+
24+
# 代码格式化机器人,详细请看 [dotnet 基于 dotnet format 的 GitHub Action 自动代码格式化机器人](https://blog.lindexi.com/post/dotnet-%E5%9F%BA%E4%BA%8E-dotnet-format-%E7%9A%84-GitHub-Action-%E8%87%AA%E5%8A%A8%E4%BB%A3%E7%A0%81%E6%A0%BC%E5%BC%8F%E5%8C%96%E6%9C%BA%E5%99%A8%E4%BA%BA.html )
25+
- name: Install dotnet-format
26+
run: dotnet tool install -g dotnet-format
27+
28+
- name: Run dotnet format
29+
run: dotnet format
30+
31+
- name: Commit files
32+
# 下面将使用机器人的账号,你可以替换为你自己的账号
33+
run: |
34+
git config --local user.name "github-actions-dotnet-formatter[bot]"
35+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
36+
git commit -a -m 'Automated dotnet-format update'
37+
continue-on-error: true
38+
39+
- name: Create Pull Request
40+
# if: steps.format.outputs.has-changes == 'true' # 如果有格式化,才继续
41+
uses: peter-evans/create-pull-request@v3
42+
with:
43+
title: '[Bot] Automated PR to fix formatting errors'
44+
body: |
45+
Automated PR to fix formatting errors
46+
committer: GitHub <noreply@github.com>
47+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
48+
# 以下是给定代码审查者,需要设置仓库有权限的开发者
49+
assignees: lindexi,walterlv
50+
reviewers: lindexi,walterlv
51+
# 对应的上传分支
52+
branch: t/bot/fix-codeformatting

.github/workflows/dotnetcore.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: .NET Core
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: windows-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Setup .NET
13+
uses: actions/setup-dotnet@v1
14+
with:
15+
dotnet-version: |
16+
3.1.x
17+
5.0.x
18+
6.0.x
19+
- name: Build with dotnet
20+
run: dotnet build --configuration Release
21+
22+
- name: Test
23+
run: dotnet test --configuration Release --no-build

0 commit comments

Comments
 (0)