diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c9bd5f..90c48cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,7 @@ jobs: - name: Remove File uses: JesseTG/rm@v1.0.3 + if: startsWith(github.ref, 'refs/heads/release/') with: path: ../../_actions/rusty-bender/vstest-action/main/dist @@ -86,7 +87,7 @@ jobs: Write-Host "Post buildMetaDataPadded:" $buildMetaDataPadded Write-Host "NuGetVersionV2ext:${nuGetVersionV2}${buildMetaDataPadded}" - + echo "FullSemVer=$fullSemVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append echo "SemVer=$semVer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append echo "NuGetVersionV2=$nuGetVersionV2" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append @@ -104,11 +105,15 @@ jobs: - name: Publish to GitHub run: dotnet nuget push "Telnet.$Env:SemVer.nupkg" --api-key ${{ secrets.PUBLISH_TO_GITHUB_PACKAGES }} --source "https://nuget.pkg.github.com/9swampy/index.json" + - name: Nuget pack + if: github.ref == 'refs/heads/master' + run: nuget pack Telnet.nuspec -Version $Env:NuGetVersionV2 + # Login to Nuget 9swampy->Api Keys and regenerate, copy to... # GitHub navigate to repo->Settings->Secrets and variables->Actions and set NUGET_APIKEY - name: Publish to Nuget if: github.ref == 'refs/heads/master' - run: nuget push "Telnet.$Env:SemVer.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json + run: nuget push "Telnet.$Env:NuGetVersionV2.nupkg" ${{ secrets.NUGET_APIKEY }} -source https://api.nuget.org/v3/index.json - name: Upload Artifact uses: actions/upload-artifact@v4