Files
HandyControl/.github/workflows/push-to-myget.yml
T
2025-12-03 22:14:33 +08:00

32 lines
837 B
YAML

name: Push to myget
on: workflow_dispatch
jobs:
push-to-myget:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: setup nuget.exe
uses: NuGet/setup-nuget@v1.0.5
- name: build and push
shell: pwsh
run: |
cd build
.\build.ps1
nuget pack build-for-myget.nuspec -version 3.7.0-beta.${env:GITHUB_RUN_NUMBER}
$nupkgName = @(gci *.nupkg)[0].Name
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
nuget push $nupkgName -Source $mygetSourcePath