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
|
||||
Reference in New Issue
Block a user