Skip to content

Commit 178fa03

Browse files
committed
Publish the npm tarball by explicit file path
npm parses a relative path that contains a slash but no ./ prefix as a GitHub owner/repo shorthand, so the first javascript release run executed `git ls-remote ssh://git@github.com/dist/payjoin-0.2.0.tgz` and failed on SSH auth instead of publishing the local tarball. The ./ prefix disambiguates the argument as a file path; reproduced and verified against npm 11.6.2 with `npm publish --dry-run`.
1 parent 4d70ec3 commit 178fa03

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/javascript.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ jobs:
152152
subject-path: ${{ steps.locate.outputs.tarball }}
153153

154154
- name: Publish to npmjs.com
155-
run: npm publish "${{ steps.locate.outputs.tarball }}"
155+
# The ./ prefix is load-bearing: npm parses a relative path with a
156+
# slash and no ./ prefix as a GitHub owner/repo shorthand and tries
157+
# to fetch it over git instead of reading the local tarball.
158+
run: npm publish "./${{ steps.locate.outputs.tarball }}"
156159

157160
github-release:
158161
name: "Attach tarball + SHA256SUMS to the GitHub release"

0 commit comments

Comments
 (0)