Skip to content

JS release workflow - #1821

Merged
benalleng merged 3 commits into
payjoin:masterfrom
spacebear21:js-release-workflow
Aug 21, 2026
Merged

JS release workflow#1821
benalleng merged 3 commits into
payjoin:masterfrom
spacebear21:js-release-workflow

Conversation

@spacebear21

Copy link
Copy Markdown
Collaborator

Builds on top of #1819

Add trusted publishing release workflow for JS bindings.

Co-authored by Claude Fable 5

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls

coveralls commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32430635257

Coverage remained the same at 86.718%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16458
Covered Lines: 14272
Line Coverage: 86.72%
Coverage Strength: 343.5 hits per line

💛 - Coveralls

@spacebear21
spacebear21 force-pushed the js-release-workflow branch 2 times, most recently from 74978bd to 16e5f60 Compare August 19, 2026 16:00
@spacebear21
spacebear21 marked this pull request as ready for review August 19, 2026 16:24

@caarloshenriq caarloshenriq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

The workflow structure mirrors the NuGet flow cleanly. Trusted publishing via OIDC, smoke tests on vanilla Node (no nix), and the PAYJOIN_JS_BUILD_TEST_UTILS toggle are all well done.

One thing I noticed: publish-npm calls npm publish without --provenance, but the job already has id-token: write and RELEASING.md step 4 expects a provenance badge on npmjs.com. Does npm@11 enable provenance by default in CI environments, or does it still need the explicit flag? If the latter, the publish step might need:

run: npm publish --provenance "${{ steps.locate.outputs.tarball }}"

@benalleng benalleng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CACK, I am unfamiliar with the --provenance flag so I am not totally sure if it is necessary but it does not appear to be a default in v11.

https://docs.npmjs.com/cli/v11/using-npm/config#provenance

Comment thread .github/workflows/javascript.yml Outdated

- name: Attest build provenance (tarball)
# A consumer runs: gh attestation verify <file>.tgz -R payjoin/rust-payjoin
uses: actions/attest-build-provenance@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the long term of this we should use actions/attest. There is a note that actions/attest-build-provenance is just a wrapper and it seems that it may be deprecated in the future.
https://github.com/actions/attest-build-provenance#usage

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

contrib/pack.sh builds the package from the maintained recent
lockfile and packs the npm tarball into artifacts/, mirroring how
contrib/test.sh drives the test build. The tarball ships only dist/
(wasm + compiled TypeScript), which is platform-independent, so a
single pack is the entire release build.

The test-utils napi addon is a dev-only helper for the integration
tests, so generate_bindings.sh gains a PAYJOIN_JS_BUILD_TEST_UTILS
toggle (default on, preserving test behavior) that the pack script
switches off.
Add the tag-gated publishing path to the JavaScript workflow,
mirroring the NuGet flow in csharp.yml: every run packs the tarball
and smoke-installs it on Linux and macOS; pushing a
payjoin-javascript-<version> tag additionally reruns the graph at
the tagged commit, then publishes the smoke-tested tarball to
npmjs.com and attaches it to the GitHub release.
As of v4, actions/attest-build-provenance is just a wrapper around
actions/attest, and its README recommends that new implementations
use actions/attest directly.

@benalleng benalleng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ca59cd9

@benalleng
benalleng merged commit ab712fc into payjoin:master Aug 21, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants