Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a487e6ef3 | |||
| c13832dd61 | |||
| ecec7dca3e | |||
| 87d32260d4 | |||
| b8298df37e |
@@ -5,18 +5,42 @@ run-name: ${{ gitea.actor }} is building new NuGet version 🚀
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Only trigger on tags like v1.0.0
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
# Optional: you can add inputs here to prompt for values when manually triggering
|
||||
inputs:
|
||||
logLevel:
|
||||
description: 'Log level'
|
||||
required: true
|
||||
default: 'warning'
|
||||
|
||||
jobs:
|
||||
buildnuget:
|
||||
runs-on: ubuntu-latest # Gitea Actions uses standard runner labels like GitHub
|
||||
|
||||
container:
|
||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||
|
||||
checkout-code:
|
||||
runs-on: ubuntu-latest # Has Git + Node.js for checkout
|
||||
steps:
|
||||
- name: Checkout code
|
||||
- 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: |
|
||||
@@ -34,9 +58,14 @@ jobs:
|
||||
dotnet pack --no-build -c Release -o ./nupkg
|
||||
|
||||
- name: Push to Gitea NuGet feed
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: GITEANUGETTOKEN
|
||||
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
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
|
||||
<!-- Package properties below -->
|
||||
<IsPackable>true</IsPackable>
|
||||
<PackageId>Sharp8N.Runtime</PackageId>
|
||||
<Version>1.0.0</Version>
|
||||
<Authors>Vitalick S</Authors>
|
||||
|
||||
Reference in New Issue
Block a user