diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml new file mode 100644 index 00000000..efa0a33e --- /dev/null +++ b/.gitea/workflows/publish-nuget.yml @@ -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 \ No newline at end of file diff --git a/Moonlight.Api/Moonlight.Api.csproj b/Moonlight.Api/Moonlight.Api.csproj index b257bf03..57440d3d 100644 --- a/Moonlight.Api/Moonlight.Api.csproj +++ b/Moonlight.Api/Moonlight.Api.csproj @@ -6,6 +6,18 @@ enable Linux + + + 2.1.0 + Moonlight.Api + Moonlight Panel + Development package of Moonlight.Api + Moonlight Panel + https://git.battlestati.one/Moonlight-Panel/Moonlight + https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE + https://git.battlestati.one/Moonlight-Panel/Moonlight + git + diff --git a/Moonlight.Frontend/Moonlight.Frontend.csproj b/Moonlight.Frontend/Moonlight.Frontend.csproj index 8f6a173b..285b5d63 100644 --- a/Moonlight.Frontend/Moonlight.Frontend.csproj +++ b/Moonlight.Frontend/Moonlight.Frontend.csproj @@ -4,11 +4,22 @@ net10.0 enable enable - True false + + 2.1.0 + Moonlight.Client + Moonlight Panel + Development package of Moonlight.Client + Moonlight Panel + https://git.battlestati.one/Moonlight-Panel/Moonlight + https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE + https://git.battlestati.one/Moonlight-Panel/Moonlight + git + + diff --git a/Moonlight.Shared/Moonlight.Shared.csproj b/Moonlight.Shared/Moonlight.Shared.csproj index 8a9732e7..7910329d 100644 --- a/Moonlight.Shared/Moonlight.Shared.csproj +++ b/Moonlight.Shared/Moonlight.Shared.csproj @@ -6,4 +6,16 @@ enable + + 2.1.0 + Moonlight.Shared + Moonlight Panel + Development package of Moonlight.Shared + Moonlight Panel + https://git.battlestati.one/Moonlight-Panel/Moonlight + https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE + https://git.battlestati.one/Moonlight-Panel/Moonlight + git + + \ No newline at end of file