66 lines
2.2 KiB
YAML
66 lines
2.2 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
|
|
# We need to build it first so the class list files generate
|
|
- name: Build project
|
|
run: dotnet build Hosts/Moonlight.Frontend.Host --configuration Debug
|
|
|
|
- name: Build tailwind styles and extract class list
|
|
working-directory: Hosts/Moonlight.Frontend.Host/Styles
|
|
run: npm install && 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 |