From 2b4123bf2b54928188ca8a736021b1c7c1d1d110 Mon Sep 17 00:00:00 2001 From: VitalickS Date: Wed, 31 Dec 2025 09:42:59 +0000 Subject: [PATCH] Update .gitea /workflows/publish-nuget.yml --- .gitea /workflows/publish-nuget.yml | 77 +++++++++++++--------------- 1 file changed, 35 insertions(+), 42 deletions(-) diff --git a/ .gitea /workflows/publish-nuget.yml b/ .gitea /workflows/publish-nuget.yml index ececff7..3968fcc 100644 --- a/ .gitea /workflows/publish-nuget.yml +++ b/ .gitea /workflows/publish-nuget.yml @@ -1,51 +1,44 @@ -kind: pipeline -type: docker name: publish-nuget run-name: ${{ gitea.actor }} is building new Nuget version 🚀 -platform: - os: linux - arch: amd64 +jobs: + build: + steps: + - name: restore + image: mcr.microsoft.com/dotnet/sdk:10.0 + commands: + - cd s8n-runtime + - dotnet restore -clone: - depth: full # Needed for versioning if using GitVersion or tags + - name: build + image: mcr.microsoft.com/dotnet/sdk:10.0 + commands: + - cd s8n-runtime + - dotnet build --no-restore -c Release -steps: - - name: restore - image: mcr.microsoft.com/dotnet/sdk:10.0 - commands: - - cd s8n-runtime - - dotnet restore + - name: pack + image: mcr.microsoft.com/dotnet/sdk:10.0 + commands: + - cd s8n-runtime + - dotnet pack --no-build -c Release -o ./nupkg + when: + event: [ tag ] # Only publish on Git tag + # Output: ./s8n-runtime/nupkg/Sharp8N.Runtime.1.0.0.nupkg - - name: build - image: mcr.microsoft.com/dotnet/sdk:10.0 - commands: - - cd s8n-runtime - - dotnet build --no-restore -c Release - - - name: pack - image: mcr.microsoft.com/dotnet/sdk:10.0 - commands: - - cd s8n-runtime - - dotnet pack --no-build -c Release -o ./nupkg - when: - event: [ tag ] # Only publish on Git tag - # Output: ./s8n-runtime/nupkg/Sharp8N.Runtime.1.0.0.nupkg - - - 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 + - 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: tags: