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:
|
||||
branches: [main]
|
||||
tags:
|
||||
- "v*"
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_URL: https://gitea.shtao1.cn
|
||||
|
||||
jobs:
|
||||
build:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Pack Domain
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages
|
||||
|
||||
- name: Pack Infrastructure
|
||||
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')
|
||||
dotnet-version: '10.0'
|
||||
|
||||
- name: Clean nuget cache
|
||||
run: dotnet nuget locals all --clear
|
||||
|
||||
- name: Publish NuGet packages
|
||||
run: |
|
||||
for pkg in ./packages/*.nupkg; do
|
||||
dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/fengling/go/__index" --skip-duplicate
|
||||
done
|
||||
./push-platform-nuget.sh all
|
||||
env:
|
||||
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