Added Gitea workflow for publishing NuGet packages and configured project files for NuGet packaging
All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 41s

This commit was merged in pull request #1.
This commit is contained in:
2026-01-14 13:36:36 +01:00
parent b79c8fe476
commit 7e0b427137
4 changed files with 94 additions and 1 deletions

View File

@@ -0,0 +1,58 @@
name: "Dev Publish: Nuget"
on:
workflow_dispatch:
push:
branches:
- v2.1
paths:
- 'Moonlight.*/*.csproj'
jobs:
publish:
name: Publish Dev Packages
runs-on: linux_amd64
steps:
- name: Check out repository code
uses: actions/checkout@v4
# Publish api server
- name: Build project
run: dotnet build Moonlight.Api --configuration Debug
- name: Publish NuGet package
run: dotnet pack Moonlight.Api --configuration Debug --output ./artifacts
- name: Push nuget package
run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }}
- name: Remove artifacts
run: rm -rf ./artifacts
# Publish frontend
- name: Build project
run: dotnet build Moonlight.Frontend --configuration Debug
- name: Publish NuGet package
run: dotnet pack Moonlight.Frontend --configuration Debug --output ./artifacts
- name: Push nuget package
run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }}
- name: Remove artifacts
run: rm -rf ./artifacts
# Publish shared
- name: Build project
run: dotnet build Moonlight.Shared --configuration Debug
- name: Publish NuGet package
run: dotnet pack Moonlight.Shared --configuration Debug --output ./artifacts
- name: Push nuget package
run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }}
- name: Remove artifacts
run: rm -rf ./artifacts