diff --git a/.github/workflows/NuGet-Tag-Publish.yml b/.github/workflows/NuGet-Tag-Publish.yml index 7de16267e..0b9f11fd5 100644 --- a/.github/workflows/NuGet-Tag-Publish.yml +++ b/.github/workflows/NuGet-Tag-Publish.yml @@ -26,7 +26,8 @@ jobs: Build: - runs-on: windows-latest + runs-on: [self-hosted, VSPreview] # 现在只有私有服务器才能打包成功 + # runs-on: windows-latest steps: - uses: actions/checkout@v1 @@ -36,13 +37,15 @@ jobs: dotnet-version: | 3.1.x 5.0.x - 6.0.101 + 6.0.x - name: Install Tools run: dotnet tool install -g dotnetCampus.TagToVersion --add-source https://api.nuget.org/v3/index.json - name: Set Package TagToVersion run: dotnet tagtoversion -t ${{ github.ref }} -f CustomWpf\build\Version.props + - name: Build WPF run: .\build.cmd -pack -ci -configuration Release -prepareMachine /p:Platform=x86 + - name: Pack NuGet run: dotnet pack CustomWpf -c release @@ -50,13 +53,13 @@ jobs: uses: nuget/setup-nuget@v1 with: nuget-version: '5.x' - - name: Add private GitHub registry to NuGet - run: | - nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }} + # - name: Add private GitHub registry to NuGet + # run: | + # nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }} - name: Push NuGet Package - run: | - nuget push .\CustomWpf\bin\Release\*.nupkg -Source github -SkipDuplicate - nuget push .\CustomWpf\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} + run: nuget push .\CustomWpf\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} + # nuget push .\CustomWpf\bin\Release\*.nupkg -Source github -SkipDuplicate + # nuget push .\CustomWpf\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} # - name: Push # uses: actions/upload-artifact@v1