Update .gitea/workflows/publish-nuget.yml
Some checks failed
publish-nuget / checkout-code (push) Successful in 5s
publish-nuget / build-and-publish (push) Failing after 3s

This commit is contained in:
2025-12-31 10:16:53 +00:00
parent 47dcafd024
commit b8298df37e

View File

@@ -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