Files
Moonlight/.gitea/workflows/publish-nuget.yml
2026-01-14 16:10:06 +01:00

62 lines
2.0 KiB
YAML

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 tailwind styles and extract class list
working-directory: Hosts/Moonlight.Frontend.Host/Styles
run: npm run build
- 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