Update .gitea /workflows/publish-nuget.yml

This commit is contained in:
2025-12-31 09:42:59 +00:00
parent 096763e89d
commit 2b4123bf2b

View File

@@ -1,51 +1,44 @@
kind: pipeline
type: docker
name: publish-nuget name: publish-nuget
run-name: ${{ gitea.actor }} is building new Nuget version 🚀 run-name: ${{ gitea.actor }} is building new Nuget version 🚀
platform: jobs:
os: linux build:
arch: amd64 steps:
- name: restore
image: mcr.microsoft.com/dotnet/sdk:10.0
commands:
- cd s8n-runtime
- dotnet restore
clone: - name: build
depth: full # Needed for versioning if using GitVersion or tags image: mcr.microsoft.com/dotnet/sdk:10.0
commands:
- cd s8n-runtime
- dotnet build --no-restore -c Release
steps: - name: pack
- name: restore image: mcr.microsoft.com/dotnet/sdk:10.0
image: mcr.microsoft.com/dotnet/sdk:10.0 commands:
commands: - cd s8n-runtime
- cd s8n-runtime - dotnet pack --no-build -c Release -o ./nupkg
- dotnet restore when:
event: [ tag ] # Only publish on Git tag
# Output: ./s8n-runtime/nupkg/Sharp8N.Runtime.1.0.0.nupkg
- name: build - name: push-to-gitea-nuget
image: mcr.microsoft.com/dotnet/sdk:10.0 image: mcr.microsoft.com/dotnet/sdk:10.0
commands: environment:
- cd s8n-runtime GITEA_TOKEN:
- dotnet build --no-restore -c Release from_secret: GITEANUGETTOKEN
commands:
- name: pack - cd s8n-runtime
image: mcr.microsoft.com/dotnet/sdk:10.0 - |
commands: dotnet nuget push ./nupkg/*.nupkg \
- cd s8n-runtime --api-key $GITEA_TOKEN \
- dotnet pack --no-build -c Release -o ./nupkg --source https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json \
when: --skip-duplicate
event: [ tag ] # Only publish on Git tag when:
# Output: ./s8n-runtime/nupkg/Sharp8N.Runtime.1.0.0.nupkg event: [ tag ] # Only publish on Git tag
- name: push-to-gitea-nuget
image: mcr.microsoft.com/dotnet/sdk:10.0
environment:
GITEA_TOKEN:
from_secret: GITEANUGETTOKEN
commands:
- cd s8n-runtime
- |
dotnet nuget push ./nupkg/*.nupkg \
--api-key $GITEA_TOKEN \
--source https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json \
--skip-duplicate
when:
event: [ tag ] # Only publish on Git tag
trigger: trigger:
tags: tags: