Files
Sharp8N.Runtime/.gitea/workflows/publish-nuget.yml
VitalickS 87d32260d4
Some checks failed
publish-nuget / checkout-code (push) Successful in 17s
publish-nuget / build-and-publish (push) Failing after 45s
Update .gitea/workflows/publish-nuget.yml
2025-12-31 10:35:40 +00:00

61 lines
1.5 KiB
YAML

name: publish-nuget
run-name: ${{ gitea.actor }} is building new NuGet version 🚀
on:
push:
tags:
- 'v*'
jobs:
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: vaibhavgawali/dotnet-node-python-openjdk:latest
needs: checkout-code
steps:
- name: Download source code
uses: actions/download-artifact@v3
with:
name: source-code
path: .
- name: Restore dependencies
run: |
cd s8n-runtime
dotnet restore
- name: Build project
run: |
cd s8n-runtime
dotnet build --no-restore -c Release
- name: Pack NuGet package
run: |
cd s8n-runtime
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 "$GITEA_TOKEN" \
--source https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json \
--skip-duplicate