Skip to content

Commit

Permalink
Delete isn't working, don't run on master
Browse files Browse the repository at this point in the history
  • Loading branch information
9swampy committed Nov 20, 2024
1 parent 63a3cf8 commit b64c9b4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b64c9b4

Please sign in to comment.