From 7637a01b2a66f123b9110cea8ef4665d144eae59 Mon Sep 17 00:00:00 2001 From: Vitali Semianiaka Date: Thu, 1 Jan 2026 12:05:11 +0300 Subject: [PATCH] building --- .gitea/workflows/publish-nuget.yml | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .gitea/workflows/publish-nuget.yml diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml new file mode 100644 index 0000000..f12e8f9 --- /dev/null +++ b/.gitea/workflows/publish-nuget.yml @@ -0,0 +1,62 @@ +name: publish-nuget + +run-name: ${{ gitea.actor }} is building new NuGet version 🚀 + +on: + push: + tags: + - 'v*' + workflow_dispatch: + # Optional: you can add inputs here to prompt for values when manually triggering + # inputs: + # notes: + # description: 'Notes' + # required: true + # default: 'Just CI Build' + +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: | + dotnet restore + + - name: Build project + run: | + dotnet build --no-restore -c Release + + - name: Pack NuGet package + run: | + dotnet pack --no-build -c Release -o ./nupkg + + - name: Push to Gitea NuGet feed + run: | + dotnet nuget push ./nupkg/*.nupkg \ + --api-key ${{ secrets.GITEANUGETTOKEN }} \ + --source https://code.sharp8n.com/api/packages/Sharp8N/nuget/index.json \ + --skip-duplicate \ No newline at end of file