Skip to content

ci: Publish release to GitHub after NPM#308

Merged
Mrtenz merged 2 commits intomainfrom
mrtenz/publish-github-after-npm
Apr 17, 2026
Merged

ci: Publish release to GitHub after NPM#308
Mrtenz merged 2 commits intomainfrom
mrtenz/publish-github-after-npm

Conversation

@Mrtenz
Copy link
Copy Markdown
Member

@Mrtenz Mrtenz commented Apr 17, 2026

This reorders the publish-release workflow to move the publish release to GitHub step after NPM publishing. NPM publish requires approval, and occasionally a release may be rejected and reverted, currently requiring manual removal of the Git tags and GitHub release, since those are always created before the approval.


Note

Medium Risk
Moderate risk because it changes the sequencing of the release pipeline (artifact build/publish dependencies), which could affect release automation if any job ordering assumptions were relied on.

Overview
The publish-release GitHub Actions workflow is restructured so the build happens first, then NPM dry-run and NPM publish run from the built artifacts, and only after NPM publish succeeds does it create the GitHub release.

This avoids creating tags/releases before the npm-publish environment approval, and adds clearer job naming while keeping the docs publish steps (gh-pages and latest) dependent on the post-publish version/output.

Reviewed by Cursor Bugbot for commit ff690d0. Bugbot is set up for automated code reviews on this repo. Configure here.

@Mrtenz Mrtenz changed the title Publish release to GitHub after NPM ci: Publish release to GitHub after NPM Apr 17, 2026
@Mrtenz Mrtenz force-pushed the mrtenz/update-actions branch from 3e1402e to a9983f8 Compare April 17, 2026 12:54
Base automatically changed from mrtenz/update-actions to main April 17, 2026 12:58
@Mrtenz Mrtenz force-pushed the mrtenz/publish-github-after-npm branch 2 times, most recently from 0ecf2a2 to f56060c Compare April 17, 2026 13:06
Comment thread .github/workflows/publish-release.yml Outdated
Comment thread .github/workflows/publish-release.yml
@Mrtenz Mrtenz marked this pull request as ready for review April 17, 2026 13:09
@Mrtenz Mrtenz requested a review from a team as a code owner April 17, 2026 13:09
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
- uses: MetaMask/action-publish-release@v3
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.

I see that this now goes after the doc publishing steps. Does it make sense for the doc publishing to go afterward instead?

This action also creates a Git tag in addition to creating the GitHub release. Do you think that will create a problem if the tag gets created after the package is published to NPM? I don't think so but I wanted to raise it in case it was.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see that this now goes after the doc publishing steps. Does it make sense for the doc publishing to go afterward instead?

They run in parallel, publish-release only needs publish-npm (just like get-release-version, which is used for publishing the docs).

This action also creates a Git tag in addition to creating the GitHub release. Do you think that will create a problem if the tag gets created after the package is published to NPM? I don't think so but I wanted to raise it in case it was.

Git and NPM tags are completely separate, so I don't think this should be a problem.

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.

Gotcha, thanks, makes sense then.

Copy link
Copy Markdown
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM.

@Mrtenz Mrtenz force-pushed the mrtenz/publish-github-after-npm branch from 42a7242 to ff690d0 Compare April 17, 2026 14:53
@Mrtenz Mrtenz enabled auto-merge (squash) April 17, 2026 14:53
@Mrtenz Mrtenz merged commit 481f045 into main Apr 17, 2026
26 checks passed
@Mrtenz Mrtenz deleted the mrtenz/publish-github-after-npm branch April 17, 2026 14:56
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