Updated workflow to handle sources aithout persisting them
This commit is contained in:
@@ -10,6 +10,7 @@ on:
|
||||
|
||||
env:
|
||||
NUGET_SOURCE: https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json
|
||||
NUGET_PUBLIC: https://api.nuget.org/v3/index.json
|
||||
CONFIGURATION: Debug
|
||||
|
||||
jobs:
|
||||
@@ -28,14 +29,20 @@ jobs:
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add moonlight nuget source
|
||||
run: dotnet nuget add source --name Moonlight-Panel ${{ env.NUGET_SOURCE }}
|
||||
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: >
|
||||
dotnet restore ${{ matrix.project }}
|
||||
--source ${{ env.NUGET_PUBLIC }}
|
||||
--source ${{ env.NUGET_SOURCE }}
|
||||
|
||||
# Frontend requires a host build + Tailwind compilation first
|
||||
- name: Build frontend host (Frontend only)
|
||||
if: matrix.project == 'MoonlightServers.Frontend'
|
||||
run: dotnet build Hosts/MoonlightServers.Frontend.Host --configuration ${{ env.CONFIGURATION }}
|
||||
run: >
|
||||
dotnet build Hosts/MoonlightServers.Frontend.Host
|
||||
--configuration ${{ env.CONFIGURATION }}
|
||||
--no-restore
|
||||
|
||||
- name: Build Tailwind styles (Frontend only)
|
||||
if: matrix.project == 'MoonlightServers.Frontend'
|
||||
@@ -43,13 +50,20 @@ jobs:
|
||||
run: npm install && npm run build
|
||||
|
||||
- name: Build project
|
||||
run: dotnet build ${{ matrix.project }} --configuration ${{ env.CONFIGURATION }}
|
||||
run: >
|
||||
dotnet build ${{ matrix.project }}
|
||||
--configuration ${{ env.CONFIGURATION }}
|
||||
--no-restore
|
||||
|
||||
- name: Pack NuGet package
|
||||
run: dotnet pack ${{ matrix.project }} --configuration ${{ env.CONFIGURATION }} --output ./artifacts
|
||||
run: >
|
||||
dotnet pack ${{ matrix.project }}
|
||||
--configuration ${{ env.CONFIGURATION }}
|
||||
--output ./artifacts
|
||||
--no-build
|
||||
|
||||
- name: Push NuGet package
|
||||
run: |
|
||||
run: >
|
||||
dotnet nuget push ./artifacts/*.nupkg
|
||||
--skip-duplicate
|
||||
--source ${{ env.NUGET_SOURCE }}
|
||||
|
||||
Reference in New Issue
Block a user