refactor: 合并 CI 配置并添加缓存清理
Some checks failed
Publish NuGet Packages / publish (push) Failing after 11s
Some checks failed
Publish NuGet Packages / publish (push) Failing after 11s
This commit is contained in:
parent
e25240f6a5
commit
2abc87af8a
@ -4,34 +4,31 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
GITEA_URL: https://gitea.shtao1.cn
|
GITEA_URL: https://gitea.shtao1.cn
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: "10.0.x"
|
dotnet-version: '10.0'
|
||||||
|
|
||||||
- name: Pack Domain
|
- name: Clean nuget cache
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
run: dotnet nuget locals all --clear
|
||||||
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages
|
|
||||||
|
|
||||||
- name: Pack Infrastructure
|
- name: Publish NuGet packages
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages
|
|
||||||
|
|
||||||
- name: Push to Gitea
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
run: |
|
run: |
|
||||||
for pkg in ./packages/*.nupkg; do
|
./push-platform-nuget.sh all
|
||||||
dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/fengling/go/__index" --skip-duplicate
|
env:
|
||||||
done
|
GITEA_HOST: gitea.shtao1.cn
|
||||||
|
GITEA_ORG: fengling
|
||||||
|
GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
name: Publish NuGet Package
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v4
|
|
||||||
with:
|
|
||||||
dotnet-version: '10.0'
|
|
||||||
|
|
||||||
- name: Publish NuGet packages
|
|
||||||
run: |
|
|
||||||
./push-platform-nuget.sh all
|
|
||||||
env:
|
|
||||||
GITEA_HOST: gitea.shtao1.cn
|
|
||||||
GITEA_ORG: fengling
|
|
||||||
GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
Loading…
Reference in New Issue
Block a user