46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Build and Publish NuGet Package
|
|
|
|
on:
|
|
push:
|
|
branches: [ v2_ChangeArchitecture,v2.1 ]
|
|
|
|
jobs:
|
|
build-scrips:
|
|
runs-on: debian-12
|
|
|
|
steps:
|
|
- name: Clean up Environment
|
|
run: rm -rf ./*
|
|
rm -rf ./.??*
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Pack cli Scrips
|
|
run: dotnet pack Resources/Scripts/Scripts.csproj -c Debug -o ./packs
|
|
|
|
- name: Publish to github Pkg
|
|
run: dotnet nuget push "./packs/*.nupkg" --skip-duplicate --api-key ${{secrets.GH_PACKAGES_READWRITE}} --source https://nuget.pkg.github.com/Moonlight-Panel/index.json
|
|
|
|
build-moonlight:
|
|
runs-on: debian-12
|
|
needs: build-scrips
|
|
|
|
steps:
|
|
- name: Clean up Environment
|
|
run: rm -rf ./*
|
|
rm -rf ./.??*
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Environment
|
|
run: mkdir ./tool
|
|
dotnet nuget add source --configfile ./tool/nuget.config -n github "https://nuget.pkg.github.com/Moonlight-Panel/index.json" -u Moonlight-Panel -p ${{secrets.GH_PACKAGES_READWRITE}} --store-password-in-clear-text
|
|
dotnet tool install --configfile ./tool/nuget.config --tool-path ./tool dotnet-moonlight
|
|
|
|
- name: Build and Pack Moonlight
|
|
run: mkdir ./tool
|
|
dotnet moonlight pack . ./packs
|
|
|
|
- name: Publish to Github
|
|
run: dotnet nuget push "./packs/*.nupkg" --skip-duplicate --api-key ${{secrets.GH_PACKAGES_READWRITE}} --source https://nuget.pkg.github.com/Moonlight-Panel/index.json
|