Skip to content

Fix release pipeline to use Trusted Publishers - #4427

Merged
allejo merged 7 commits into
mainfrom
fix/release-pipeline
Aug 11, 2026
Merged

Fix release pipeline to use Trusted Publishers#4427
allejo merged 7 commits into
mainfrom
fix/release-pipeline

Conversation

@allejo

@allejo allejo commented Jul 6, 2026

Copy link
Copy Markdown
Member

Josh, in your absence, I tagged and released 11.11.2 with all the already-merged PRs through July 2025. The new release could not be automatically published to npm or our CDN repo due to expired or revoked tokens (in December 2025, npm revoked all classic tokens).

Changes

I've logged in and configured the highlight.js and @highlightjs/cdn-assets packages to use npm's new Trusted Publishers pattern.

I've largely refactored the pipeline in this PR and removed a lot of the third-party actions that were previously used. The last hardcoded dry run of this action was successful. It's hard to test a production release pipeline, so I'm hoping you can serve as a second pair of eyes.

I also added a workflow_dispatch so we can manually publish specific tags when our pipeline is broken and doesn't auto-publish, as in 11.11.2.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

@allejo
allejo requested a review from joshgoebel July 6, 2026 04:28
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

No changes

No existing files changed.

Comment thread .github/workflows/release.yml Outdated
@arturict

Copy link
Copy Markdown
Contributor

Looks good. If CI policy changed, please include a quick note confirming no downstream pipeline regressions from release pipeline change.

@paladox

paladox commented Jul 22, 2026

Copy link
Copy Markdown
Member

@allejo see comment please :)

@joshgoebel are you able to review please? :)

allejo and others added 2 commits August 4, 2026 23:27
Co-authored-by: Artur <145776561+arturict@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

1 file changed

Total change +1 B

View Changes
file base pr diff
highlight.min.js 8.28 KB 8.28 KB +1 B

@allejo

allejo commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

If CI policy changed, please include a quick note confirming no downstream pipeline regressions from release pipeline change.

I don't follow. The deployment logic remains unchanged after this PR; the pipeline behaves as follows:

  1. Clone the tag we're publishing
  2. Build the library for node
  3. Sanity checks + validation of what we're publishing
  4. Publish to npm
  5. Clone our CDN GitHub repo
  6. Build the library for CDN
  7. Commit + Push to repo
  8. Publish CDN package to npm

Separate from the pipeline, CDNs pull the aforementioned CDN package and deploy that. I'm not sure how the CDNs are configured, but I hope they're not broken; we'll find out once things are published 😅

@joshgoebel

Copy link
Copy Markdown
Member

If we're doing something new here it'd be great to make sure it can do beta releases... I'd love to release a beta of 12 soon, but I does our release process even work right now? I'd really like to be able to release 11-stable and 12-beta concurrently for at least a little while.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change -3 B

View Changes
file base pr diff
es/core.min.js 8.24 KB 8.24 KB -1 B
es/highlight.min.js 8.24 KB 8.24 KB -1 B
highlight.min.js 8.28 KB 8.28 KB -1 B

Check the registry first so a re-run can finish CDN steps after a
partial release without failing on "version already published".
Also bump setup-node to v7.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

2 files changed

Total change -2 B

View Changes
file base pr diff
es/core.min.js 8.24 KB 8.24 KB -1 B
es/highlight.min.js 8.24 KB 8.24 KB -1 B

workflow_dispatch can pass any tag name; only allow the same shapes
as on.push.tags so typos never publish under npm latest.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

No changes

No existing files changed.

@joshgoebel joshgoebel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@allejo Back to you... any concerns with my changes? Just a few cleanups grok suggested. If not, this is good to go I think.

@github-actions

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

3 files changed

Total change +3 B

View Changes
file base pr diff
es/core.min.js 8.22 KB 8.22 KB +1 B
es/highlight.min.js 8.22 KB 8.22 KB +1 B
highlight.min.js 8.26 KB 8.26 KB +1 B

@allejo
allejo merged commit 1414c96 into main Aug 11, 2026
23 checks passed
@allejo
allejo deleted the fix/release-pipeline branch August 11, 2026 07:03
@allejo

allejo commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

The workflow ran successfully to publish 11.11.2 to npm and our CDN repo. The release should be available shortly. 🎉

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