Added Gitea workflow for publishing NuGet packages and configured project files for NuGet packaging
All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 41s
All checks were successful
Dev Publish: Nuget / Publish Dev Packages (push) Successful in 41s
This commit was merged in pull request #1.
This commit is contained in:
58
.gitea/workflows/publish-nuget.yml
Normal file
58
.gitea/workflows/publish-nuget.yml
Normal file
@@ -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
|
||||
@@ -7,6 +7,18 @@
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Nuget Package Settings">
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.Api</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>Development package of Moonlight.Api</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Moonlight.Shared\Moonlight.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -4,11 +4,22 @@
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
<StaticWebAssetsEnabled>True</StaticWebAssetsEnabled>
|
||||
<CompressionEnabled>false</CompressionEnabled>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Nuget Package Settings">
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.Client</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>Development package of Moonlight.Client</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="10.0.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.1"/>
|
||||
|
||||
@@ -6,4 +6,16 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Nuget Package Settings">
|
||||
<Version>2.1.0</Version>
|
||||
<Title>Moonlight.Shared</Title>
|
||||
<Authors>Moonlight Panel</Authors>
|
||||
<Description>Development package of Moonlight.Shared</Description>
|
||||
<Copyright>Moonlight Panel</Copyright>
|
||||
<PackageProjectUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight/src/branch/v2.1/LICENSE</PackageLicenseUrl>
|
||||
<RepositoryUrl>https://git.battlestati.one/Moonlight-Panel/Moonlight</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user