Add NuGet CI workflow
Some checks failed
Publish ServiceDiscovery NuGet Packages / build (push) Failing after 1m31s
Some checks failed
Publish ServiceDiscovery NuGet Packages / build (push) Failing after 1m31s
This commit is contained in:
parent
d216aeda44
commit
4d64778d85
41
.gitea/workflows/nuget.yml
Normal file
41
.gitea/workflows/nuget.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Publish ServiceDiscovery NuGet Packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
GITEA_URL: https://gitea.shtao1.cn
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: "10.0.x"
|
||||||
|
|
||||||
|
- name: Pack Core
|
||||||
|
if: startsWith(github.ref, "refs/tags/v")
|
||||||
|
run: dotnet pack fengling-service-discovery/Fengling.ServiceDiscovery.Core/Fengling.ServiceDiscovery.Core.csproj -c Release -o ./packages
|
||||||
|
|
||||||
|
- name: Pack Kubernetes
|
||||||
|
if: startsWith(github.ref, "refs/tags/v")
|
||||||
|
run: dotnet pack fengling-service-discovery/Fengling.ServiceDiscovery.Kubernetes/Fengling.ServiceDiscovery.Kubernetes.csproj -c Release -o ./packages
|
||||||
|
|
||||||
|
- name: Pack Static
|
||||||
|
if: startsWith(github.ref, "refs/tags/v")
|
||||||
|
run: dotnet pack fengling-service-discovery/Fengling.ServiceDiscovery.Static/Fengling.ServiceDiscovery.Static.csproj -c Release -o ./packages
|
||||||
|
|
||||||
|
- name: Push to Gitea
|
||||||
|
if: startsWith(github.ref, "refs/tags/v")
|
||||||
|
run: |
|
||||||
|
for pkg in ./packages/*.nupkg; do
|
||||||
|
dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/movingsam/go/__index" --skip-duplicate
|
||||||
|
done
|
||||||
Loading…
Reference in New Issue
Block a user