2024-03-24 13:24:41 +08:00
|
|
|
name: Push to myget
|
|
|
|
|
2021-04-10 18:22:33 +08:00
|
|
|
on: workflow_dispatch
|
2020-04-06 01:14:16 +08:00
|
|
|
|
|
|
|
jobs:
|
2021-04-13 20:54:55 +08:00
|
|
|
push-to-myget:
|
2020-04-06 01:14:16 +08:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2021-04-10 16:00:40 +08:00
|
|
|
- name: checkout
|
2024-05-20 16:59:30 +08:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-09-27 17:21:18 +08:00
|
|
|
|
2021-12-21 23:35:47 +08:00
|
|
|
- name: Setup .NET Core SDK
|
2024-05-20 16:59:30 +08:00
|
|
|
uses: actions/setup-dotnet@v4
|
2021-12-21 23:35:47 +08:00
|
|
|
with:
|
2024-01-10 22:20:43 +08:00
|
|
|
dotnet-version: '8.0.x'
|
2023-09-27 17:21:18 +08:00
|
|
|
|
2021-04-10 17:08:40 +08:00
|
|
|
- name: setup nuget.exe
|
2021-04-10 17:11:13 +08:00
|
|
|
uses: NuGet/setup-nuget@v1.0.5
|
2023-09-27 17:21:18 +08:00
|
|
|
|
2021-04-13 20:54:55 +08:00
|
|
|
- name: build and push
|
2021-04-10 17:00:22 +08:00
|
|
|
shell: pwsh
|
2021-04-10 16:00:40 +08:00
|
|
|
run: |
|
|
|
|
cd build
|
2021-04-10 17:00:22 +08:00
|
|
|
.\build.ps1
|
2023-09-27 17:21:18 +08:00
|
|
|
nuget pack build-for-myget.nuspec -version 3.5.0-beta.${env:GITHUB_RUN_NUMBER}
|
2021-04-10 17:00:22 +08:00
|
|
|
$nupkgName = @(gci *.nupkg)[0].Name
|
|
|
|
$mygetSourcePath = "https://www.myget.org/F/handycontrol"
|
2021-04-10 18:04:18 +08:00
|
|
|
nuget setApiKey ${{ secrets.MYGETTOKEN }} -Source $mygetSourcePath
|
2021-04-10 17:09:06 +08:00
|
|
|
nuget push $nupkgName -Source $mygetSourcePath
|