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