Skip to content

Commit cd0a0af

Browse files
committed
fix: Correct GitHub ref context output and simplify dry-run condition
1 parent a7a4923 commit cd0a0af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
shell: pwsh
5757
run: |
5858
Write-Host "GitHub Ref (env. variable): $env:GITHUB_REF"
59-
Write-Host "GitHub Ref (context): {{ github.ref }}"
59+
Write-Host "GitHub Ref (context): ${{ github.ref }}"
6060
6161
- name: Install Dependencies
6262
run: npm ci
@@ -74,7 +74,7 @@ jobs:
7474
run: npm publish --access public --tag ${{ inputs.npm-tag }} --dry-run
7575

7676
- name: Publish to NPM
77-
if: github.ref == 'refs/heads/main' && inputs.dry-run == 'false'
77+
if: github.ref == 'refs/heads/main' && !inputs.dry-run
7878
env:
7979
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8080
run: npm publish --access public --tag ${{ inputs.npm-tag }}

0 commit comments

Comments
 (0)