Skip to content

Release pipeline hardening - #146

Merged
Ryang-21 merged 2 commits into
masterfrom
release-pipeline-hardening
Jul 7, 2026
Merged

Release pipeline hardening#146
Ryang-21 merged 2 commits into
masterfrom
release-pipeline-hardening

Conversation

@Ryang-21

@Ryang-21 Ryang-21 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fix the publish pipeline and add missing CI gates

The publish workflow was likely broken (pnpm 9 pinned against engines >=10),
and nothing anywhere ran the type checker.

  • packageManager: pnpm@10.33.0 — both workflows now let
    pnpm/action-setup read it instead of pinning divergent inline versions,
    fixing the publish job's engines mismatch.
  • prepublishOnly gatebuild && typecheck && lint && test runs on any
    publish, so a stale or untested dist/ can't ship from a local machine.
  • CI runs typecheck and lint — vitest transpiles with esbuild, which
    strips types without checking them; type errors could previously merge green.
    Also adds a Node 22/24 matrix and bumps actions to v4.
  • Publish workflow commits to npm Trusted Publishing — removes the
    redundant NPM_TOKEN (the job already had id-token: write +
    --provenance). Requires the repo to be registered as a trusted publisher
    for @stellar/js-xdr on npmjs.com before the next release.
  • Housekeeping: clean also removes the stale v4 lib/ bundle; npm
    keywords populated.

@Ryang-21
Ryang-21 requested review from Copilot and quietbits July 7, 2026 15:13
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copilot AI 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.

Pull request overview

Hardens the release/publish pipeline by aligning pnpm versions across workflows, adding missing CI gates (typecheck/lint), and ensuring publishes can’t bypass the full build/verification suite.

Changes:

  • Add packageManager: pnpm@10.33.0 and enforce a prepublishOnly gate running build/typecheck/lint/test.
  • Update CI to run on a Node 22/24 matrix and add explicit typecheck + lint steps.
  • Update npm publish workflow for Trusted Publishing (OIDC) and remove token-based auth.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
package.json Pins pnpm via packageManager, adds prepublishOnly gating, expands cleanup, and populates keywords.
.github/workflows/tests.yml Adds Node 22/24 matrix and runs typecheck and lint in CI.
.github/workflows/npm-publish.yml Updates actions, uses OIDC trusted publishing flow, and expands publish-time gates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 38 to +41
- name: Publish to npm
run: pnpm publish --access public --provenance --no-git-checks --tag ${{ github.event.release.prerelease && 'rc' || 'latest' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run:
pnpm publish --access public --provenance --no-git-checks --tag ${{
github.event.release.prerelease && 'rc' || 'latest' }}
Comment thread .github/workflows/tests.yml Outdated
Comment on lines +18 to +25
- name: Install pnpm
# Version comes from the packageManager field in package.json.
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
version: 10
node-version: ${{ matrix.node-version }}
Comment thread .github/workflows/npm-publish.yml Outdated
Comment on lines 16 to 24
- name: Install pnpm
# Version comes from the packageManager field in package.json.
uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
@Ryang-21
Ryang-21 merged commit 1f8ac4b into master Jul 7, 2026
7 checks passed
@Ryang-21
Ryang-21 deleted the release-pipeline-hardening branch July 7, 2026 19:01
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.

3 participants