From e2f0d612243d559edfcb75ca0f54d2184d45f331 Mon Sep 17 00:00:00 2001 From: VitalickS Date: Wed, 31 Dec 2025 10:05:51 +0000 Subject: [PATCH] Update .gitea/workflows/publish-nuget.yml --- .gitea/workflows/build-and-test.yml | 26 ------------------ .gitea/workflows/publish-nuget.yml | 42 +++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 26 deletions(-) delete mode 100644 .gitea/workflows/build-and-test.yml create mode 100644 .gitea/workflows/publish-nuget.yml diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml deleted file mode 100644 index c425ac2..0000000 --- a/.gitea/workflows/build-and-test.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build and Test - -run-name: ${{ gitea.actor }} is building a Docker image 🚀 - -on: [push] # Triggers the workflow on push events - -jobs: - build-image: - runs-on: ubuntu-latest # Specifies the runner environment - steps: - - name: Checkout Code - uses: actions/checkout@v4 # Uses a standard action to check out the repository code - - - name: Login to the DockerHub registry - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Docker image - run: | - docker build -t ${{ vars.DOCKERHUB_IMAGENAME }} . - docker push ${{ vars.DOCKERHUB_IMAGENAME }} - - - name: Run tests (example) - run: docker run --rm ${{ vars.DOCKERHUB_IMAGENAME }} diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml new file mode 100644 index 0000000..7cdbd9d --- /dev/null +++ b/.gitea/workflows/publish-nuget.yml @@ -0,0 +1,42 @@ +name: publish-nuget + +run-name: ${{ gitea.actor }} is building new NuGet version 🚀 + +on: + push: + tags: + - 'v*' # Only trigger on tags like v1.0.0 + +jobs: + buildnuget: + runs-on: ubuntu-latest # Gitea Actions uses standard runner labels like GitHub + + container: + image: mcr.microsoft.com/dotnet/sdk:10.0 + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - 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 + run: | + cd s8n-runtime + 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