From b8298df37e1e2e8453e30c7f84b61cb68d3cbd55 Mon Sep 17 00:00:00 2001 From: VitalickS Date: Wed, 31 Dec 2025 10:16:53 +0000 Subject: [PATCH] Update .gitea/workflows/publish-nuget.yml --- .gitea/workflows/publish-nuget.yml | 33 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml index 7cdbd9d..a94f3c1 100644 --- a/.gitea/workflows/publish-nuget.yml +++ b/.gitea/workflows/publish-nuget.yml @@ -5,18 +5,35 @@ run-name: ${{ gitea.actor }} is building new NuGet version 🚀 on: push: tags: - - 'v*' # Only trigger on tags like v1.0.0 + - 'v*' jobs: - buildnuget: - runs-on: ubuntu-latest # Gitea Actions uses standard runner labels like GitHub + checkout-code: + runs-on: ubuntu-latest # Has Git + Node.js for checkout + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Needed for version detection if used + - name: Upload source code as artifact + uses: actions/upload-artifact@v3 + with: + name: source-code + path: ./ + retention-days: 1 + + build-and-publish: + runs-on: ubuntu-latest container: image: mcr.microsoft.com/dotnet/sdk:10.0 - + needs: checkout-code steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Download source code + uses: actions/download-artifact@v3 + with: + name: source-code + path: . - name: Restore dependencies run: | @@ -34,9 +51,11 @@ jobs: dotnet pack --no-build -c Release -o ./nupkg - name: Push to Gitea NuGet feed + env: + GITEA_TOKEN: ${{ secrets.GITEANUGETTOKEN }} run: | cd s8n-runtime dotnet nuget push ./nupkg/*.nupkg \ - --api-key ${{ secrets.GITEANUGETTOKEN }} \ + --api-key "$GITEA_TOKEN" \ --source https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json \ --skip-duplicate \ No newline at end of file