Skip to content

Commit b462b1e

Browse files
committed
only publish to Powershell Gallery when tagged with new version
1 parent dc24bfe commit b462b1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/release-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ jobs:
4848
(((Get-Content $psd1File -Raw) -replace '\$version\$',$version) -replace '\$prerelease\$',$prerelease) | Set-Content $psd1File
4949
5050
- name: Publish to PowerShell Gallery
51+
if: startsWith(github.ref, 'refs/tags/v')
5152
shell: pwsh
5253
run: |
5354
Publish-Module -Path (Join-Path $env:GITHUB_WORKSPACE "Module" "7Zip4Powershell") -NuGetApiKey $env:NUGET_API_KEY
5455
env:
5556
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
57+

0 commit comments

Comments
 (0)