Skip to content

enable trusted publishing for npm#927

Merged
hatemhosny merged 4 commits intodevelopfrom
OIDC
Dec 7, 2025
Merged

enable trusted publishing for npm#927
hatemhosny merged 4 commits intodevelopfrom
OIDC

Conversation

@hatemhosny
Copy link
Copy Markdown
Collaborator

@hatemhosny hatemhosny commented Dec 7, 2025

see:

Summary by CodeRabbit

  • Chores
    • Upgraded Node.js runtime from 18.x to 24.x across all CI/CD workflows.
    • Updated npm to version 11.6.4 in the release workflow.
    • Enhanced publishing authentication method in the release process.

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 7, 2025

Deploy Preview for livecodes ready!

Name Link
🔨 Latest commit 33f0118
🔍 Latest deploy log https://app.netlify.com/projects/livecodes/deploys/69359077db7e3100085c2102
😎 Deploy Preview https://deploy-preview-927--livecodes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 7, 2025

Deploying livecodes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33f0118
Status: ✅  Deploy successful!
Preview URL: https://9ef3f11d.livecodes.pages.dev
Branch Preview URL: https://oidc.livecodes.pages.dev

View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 7, 2025

Size Change: +107 B (+0.01%)

Total Size: 1.01 MB

ℹ️ View Unchanged
Filename Size Change
./build/404.html 1 kB 0 B
./build/app.html 250 B 0 B
./build/index.html 2.46 kB +1 B (+0.04%)
./build/livecodes/app.css 22.4 kB 0 B
./build/livecodes/app.js 111 kB +32 B (+0.03%)
./build/livecodes/assets.js 8.64 kB +25 B (+0.29%)
./build/livecodes/assets/noop.js 18 B 0 B
./build/livecodes/assets/templates/diagrams-starter.html 2.19 kB 0 B
./build/livecodes/backup.js 3.73 kB +14 B (+0.38%)
./build/livecodes/blockly.js 13.4 kB 0 B
./build/livecodes/broadcast.js 1.19 kB -4 B (-0.34%)
./build/livecodes/bundle-types.js 4.37 kB 0 B
./build/livecodes/code-to-image.js 9.1 kB -16 B (-0.18%)
./build/livecodes/codejar.js 17.6 kB 0 B
./build/livecodes/codemirror.js 6.33 kB 0 B
./build/livecodes/compile.page.js 2.39 kB 0 B
./build/livecodes/compile.worker.js 14.4 kB 0 B
./build/livecodes/compiler-utils.js 3.16 kB 0 B
./build/livecodes/custom-editor-utils.js 198 B 0 B
./build/livecodes/deploy.js 6.88 kB -2 B (-0.03%)
./build/livecodes/editor-settings.js 17.8 kB +44 B (+0.25%)
./build/livecodes/embed-ui.js 5.54 kB +3 B (+0.05%)
./build/livecodes/embed.js 89.7 kB +63 B (+0.07%)
./build/livecodes/export.js 3.89 kB 0 B
./build/livecodes/firebase.js 22.7 kB 0 B
./build/livecodes/format.worker.js 13.5 kB 0 B
./build/livecodes/google-fonts.js 7.12 kB 0 B
./build/livecodes/headless.js 78.4 kB -97 B (-0.12%)
./build/livecodes/i18n-ar-language-info.json 5.23 kB 0 B
./build/livecodes/i18n-ar-translation.json 9.33 kB 0 B
./build/livecodes/i18n-bn-language-info.json 5.58 kB 0 B
./build/livecodes/i18n-bn-translation.json 9.63 kB 0 B
./build/livecodes/i18n-de-language-info.json 5.25 kB 0 B
./build/livecodes/i18n-de-translation.json 9.44 kB 0 B
./build/livecodes/i18n-en-language-info.json 4.53 kB 0 B
./build/livecodes/i18n-en-translation.json 8.03 kB 0 B
./build/livecodes/i18n-es-language-info.json 5 kB 0 B
./build/livecodes/i18n-es-translation.json 9.17 kB 0 B
./build/livecodes/i18n-fa-language-info.json 5.35 kB 0 B
./build/livecodes/i18n-fa-translation.json 9.48 kB 0 B
./build/livecodes/i18n-fr-language-info.json 5.17 kB 0 B
./build/livecodes/i18n-fr-translation.json 9.42 kB 0 B
./build/livecodes/i18n-hi-language-info.json 5.78 kB 0 B
./build/livecodes/i18n-hi-translation.json 9.95 kB 0 B
./build/livecodes/i18n-id-language-info.json 4.75 kB 0 B
./build/livecodes/i18n-id-translation.json 8.69 kB 0 B
./build/livecodes/i18n-it-language-info.json 5.04 kB 0 B
./build/livecodes/i18n-it-translation.json 9.26 kB 0 B
./build/livecodes/i18n-ja-language-info.json 5.57 kB 0 B
./build/livecodes/i18n-ja-translation.json 9.61 kB 0 B
./build/livecodes/i18n-nl-language-info.json 4.92 kB 0 B
./build/livecodes/i18n-nl-translation.json 8.9 kB 0 B
./build/livecodes/i18n-pt-language-info.json 5.05 kB 0 B
./build/livecodes/i18n-pt-translation.json 9.35 kB 0 B
./build/livecodes/i18n-ru-language-info.json 5.56 kB 0 B
./build/livecodes/i18n-ru-translation.json 10.3 kB 0 B
./build/livecodes/i18n-tr-language-info.json 5.16 kB 0 B
./build/livecodes/i18n-tr-translation.json 9.24 kB 0 B
./build/livecodes/i18n-ur-language-info.json 5.81 kB 0 B
./build/livecodes/i18n-ur-translation.json 9.78 kB 0 B
./build/livecodes/i18n-zh-CN-language-info.json 4.9 kB 0 B
./build/livecodes/i18n-zh-CN-translation.json 8.64 kB 0 B
./build/livecodes/i18n.js 20.4 kB +43 B (+0.21%)
./build/livecodes/import-src.js 16.1 kB 0 B
./build/livecodes/import.js 14.5 kB -15 B (-0.1%)
./build/livecodes/index.js 5.37 kB -6 B (-0.11%)
./build/livecodes/lang-art-template-compiler.js 1.65 kB 0 B
./build/livecodes/lang-assemblyscript-compiler.js 290 B 0 B
./build/livecodes/lang-assemblyscript-script.js 386 B 0 B
./build/livecodes/lang-astro-compiler.js 2.34 kB 0 B
./build/livecodes/lang-clio-compiler.js 1.55 kB 0 B
./build/livecodes/lang-commonlisp-script.js 123 B 0 B
./build/livecodes/lang-cpp-script.js 1.75 kB 0 B
./build/livecodes/lang-cpp-wasm-script.js 2.84 kB 0 B
./build/livecodes/lang-csharp-wasm-script.js 2.18 kB 0 B
./build/livecodes/lang-diagrams-compiler-esm.js 5.09 kB 0 B
./build/livecodes/lang-dot-compiler.js 1.66 kB 0 B
./build/livecodes/lang-ejs-compiler.js 1.63 kB 0 B
./build/livecodes/lang-eta-compiler.js 1.65 kB 0 B
./build/livecodes/lang-fennel-compiler.js 1.61 kB 0 B
./build/livecodes/lang-gleam-compiler.js 3.09 kB 0 B
./build/livecodes/lang-go-wasm-script.js 3.25 kB 0 B
./build/livecodes/lang-haml-compiler.js 1.65 kB 0 B
./build/livecodes/lang-handlebars-compiler.js 1.92 kB 0 B
./build/livecodes/lang-imba-compiler.js 147 B 0 B
./build/livecodes/lang-java-script.js 4.05 kB 0 B
./build/livecodes/lang-jinja-compiler.js 1.65 kB 0 B
./build/livecodes/lang-julia-script.js 3.3 kB 0 B
./build/livecodes/lang-liquid-compiler.js 1.68 kB 0 B
./build/livecodes/lang-lua-wasm-script.js 205 B 0 B
./build/livecodes/lang-malina-compiler.js 2.96 kB 0 B
./build/livecodes/lang-mustache-compiler.js 1.65 kB 0 B
./build/livecodes/lang-nunjucks-compiler.js 1.93 kB 0 B
./build/livecodes/lang-perl-script.js 268 B 0 B
./build/livecodes/lang-php-wasm-script.js 347 B 0 B
./build/livecodes/lang-postgresql-compiler-esm.js 1.73 kB 0 B
./build/livecodes/lang-prolog-script.js 204 B 0 B
./build/livecodes/lang-pug-compiler.js 371 B 0 B
./build/livecodes/lang-python-wasm-script.js 1.86 kB 0 B
./build/livecodes/lang-r-script-esm.js 2.44 kB 0 B
./build/livecodes/lang-rescript-compiler-esm.js 2.16 kB 0 B
./build/livecodes/lang-rescript-formatter.js 1.52 kB 0 B
./build/livecodes/lang-riot-compiler.js 2.81 kB 0 B
./build/livecodes/lang-ruby-wasm-script.js 1.7 kB 0 B
./build/livecodes/lang-scss-compiler.js 1.71 kB 0 B
./build/livecodes/lang-solid-compiler.js 263 B 0 B
./build/livecodes/lang-sql-compiler.js 1.64 kB 0 B
./build/livecodes/lang-sql-script.js 1.95 kB 0 B
./build/livecodes/lang-svelte-compiler.js 4.69 kB 0 B
./build/livecodes/lang-tcl-script.js 1.82 kB 0 B
./build/livecodes/lang-teal-compiler.js 1.72 kB 0 B
./build/livecodes/lang-twig-compiler.js 1.64 kB 0 B
./build/livecodes/lang-vento-compiler.js 1.68 kB 0 B
./build/livecodes/lang-vue-compiler.js 6.08 kB 0 B
./build/livecodes/lang-vue2-compiler.js 3.47 kB 0 B
./build/livecodes/lang-wat-compiler.js 348 B 0 B
./build/livecodes/lang-wat-script.js 1.58 kB 0 B
./build/livecodes/language-info.js 7.71 kB +5 B (+0.06%)
./build/livecodes/monaco-lang-astro.js 947 B 0 B
./build/livecodes/monaco-lang-clio.js 639 B 0 B
./build/livecodes/monaco-lang-imba.js 7.35 kB 0 B
./build/livecodes/monaco-lang-wat.js 2.46 kB 0 B
./build/livecodes/monaco.js 10.1 kB 0 B
./build/livecodes/open.js 6.2 kB +3 B (+0.05%)
./build/livecodes/processor-lightningcss-compiler.js 1.88 kB 0 B
./build/livecodes/processor-postcss-compiler.js 2.02 kB 0 B
./build/livecodes/processor-tailwindcss-compiler.js 5.24 kB 0 B
./build/livecodes/processor-unocss-compiler.js 355 B 0 B
./build/livecodes/processor-windicss-compiler.js 450 B 0 B
./build/livecodes/quill.js 5.8 kB 0 B
./build/livecodes/quill.css 697 B 0 B
./build/livecodes/resources.js 3.43 kB -3 B (-0.09%)
./build/livecodes/result-utils.js 1.17 kB 0 B
./build/livecodes/share.js 3.81 kB -1 B (-0.03%)
./build/livecodes/snippets.js 6.05 kB +15 B (+0.25%)
./build/livecodes/sync-ui.js 3.25 kB +3 B (+0.09%)
./build/livecodes/sync.js 3.52 kB 0 B
./build/livecodes/sync.worker.js 29.7 kB 0 B
./build/livecodes/templates.js 25.4 kB 0 B
./build/sdk/livecodes.js 3.96 kB 0 B
./build/sdk/livecodes.umd.js 4.02 kB 0 B
./build/sdk/package.json 291 B 0 B
./build/sdk/react.js 4.26 kB 0 B
./build/sdk/vue.js 4.35 kB 0 B

compressed-size-action

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 7, 2025

Walkthrough

GitHub Actions workflows are updated to use Node.js 24.x instead of 18.x across all pipelines. YAML string quoting is standardized to double quotes for consistency. The release workflow adds GitHub token permissions, npm version 11.6.4 installation, and switches from token-based to OIDC-based npm authentication.

Changes

Cohort / File(s) Summary
CI and Build Workflows
.github/workflows/CI-build.yml, .github/workflows/CI-e2e.yml
Node.js version bumped from 18.x to 24.x. YAML string quoting standardized to double quotes for NODE_OPTIONS and cache configuration keys.
i18n Workflows
.github/workflows/i18n-update-pull.yml, .github/workflows/i18n-update-push.yml, .github/workflows/i18n-update-scheduled.yml
Node.js version updated from 18.x to 24.x. Cache configuration quoting normalized to double quotes. Minor formatting update in i18n-update-push.yml PR comment (backtick escaping).
Deploy Workflow
.github/workflows/deploy.yml
Node.js version bumped from 18.x to 24.x. NODE_OPTIONS and cache configuration strings switched from single to double quotes.
Release Workflow
.github/workflows/release.yml
Node.js version updated from 18.x to 24.x. Added workflow permissions for id-token and contents. Introduced npm 11.6.4 installation step after Node setup. Replaced NPM_TOKEN-based authentication with OIDC-based npm publish. String quoting normalized to double quotes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Most changes follow a highly repetitive pattern (Node version bump and quote normalization across multiple files).
  • Additional attention: .github/workflows/release.yml — review the OIDC authentication implementation, new workflow permissions, and npm version update step to ensure compatibility with the publishing pipeline.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'enable trusted publishing for npm' directly aligns with the main change: adding GitHub Actions workflow permissions and implementing OIDC-based trusted publishing, including updating npm to 11.6.4 for OIDC support and removing NPM_TOKEN authentication.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch OIDC

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

46-48: Comment-code alignment: npm version 11.6.4 vs. comment mention of 11.5.1.

Line 46 states "Ensure npm 11.5.1 or later", but line 48 installs 11.6.4. This is safe (11.6.4 > 11.5.1), but update the comment to match the actual installed version for clarity.

-      # Ensure npm 11.5.1 or later is installed (for OIDC)
+      # Ensure npm 11.6.4 or later is installed (for OIDC)
       - name: Update npm
         run: npm install -g npm@11.6.4
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f57e17 and 72a1cfc.

📒 Files selected for processing (7)
  • .github/workflows/CI-build.yml (2 hunks)
  • .github/workflows/CI-e2e.yml (2 hunks)
  • .github/workflows/deploy.yml (2 hunks)
  • .github/workflows/i18n-update-pull.yml (2 hunks)
  • .github/workflows/i18n-update-push.yml (3 hunks)
  • .github/workflows/i18n-update-scheduled.yml (3 hunks)
  • .github/workflows/release.yml (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Redirect rules - livecodes
  • GitHub Check: Header rules - livecodes
  • GitHub Check: Pages changed - livecodes
  • GitHub Check: tests (24.x, 4)
  • GitHub Check: tests (24.x, 2)
  • GitHub Check: tests (24.x, 5)
  • GitHub Check: tests (24.x, 1)
  • GitHub Check: tests (24.x, 3)
  • GitHub Check: build (24.x)
  • GitHub Check: build
  • GitHub Check: build (24.x)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (8)
.github/workflows/CI-build.yml (1)

10-10: Verify Node.js 24.x compatibility across the codebase.

Node.js 24 has entered Long-Term Support (LTS) and will continue receiving maintenance through April 2028, so the version bump is production-appropriate. However, the jump from 18.x to 24.x is significant. Ensure all dependencies and custom code are compatible with Node 24 breaking changes (e.g., child_process.spawn() and execFile() now disallow string arguments and enforce explicit array-based argument passing to prevent shell injection).

Run your full test suite against Node 24.x to confirm compatibility before merging. Consider also testing locally or creating a separate CI run to validate against Node 24 if not already covered.

Also applies to: 12-12, 21-22

.github/workflows/deploy.yml (1)

10-10: Node.js 24.x compatibility—same as CI-build.yml.

Same verification required as flagged in CI-build.yml.

Also applies to: 16-16, 34-35

.github/workflows/i18n-update-pull.yml (1)

10-10: Node.js 24.x compatibility—applies to all workflows.

Same compatibility verification applies as flagged in CI-build.yml.

Also applies to: 94-95

.github/workflows/CI-e2e.yml (1)

11-11: Node.js 24.x compatibility—applies to all workflows.

Also applies to: 14-14, 23-24

.github/workflows/i18n-update-push.yml (1)

10-10: Node.js 24.x compatibility + comment formatting.

Node.js compatibility verification applies (see CI-build.yml). Line 139 appears to be a minor markdown formatting change in the workflow comment—confirm this is intentional and renders correctly.

Also applies to: 94-95, 139-139

.github/workflows/i18n-update-scheduled.yml (1)

8-8: Node.js 24.x compatibility—applies to all workflows.

Also applies to: 19-19, 58-59

.github/workflows/release.yml (2)

9-11: OIDC permissions configured correctly.

The critical requirement is the id-token: write permission, which allows GitHub Actions to generate OIDC tokens. The permissions block correctly includes both id-token: write (for OIDC) and contents: write (for creating releases).


103-103: Verify OIDC setup is configured on npm registry before merge.

Trusted publishing allows you to publish npm packages directly from your CI/CD workflows using OpenID Connect (OIDC) authentication, eliminating the need for long-lived npm tokens. The workflow now relies entirely on OIDC (no NPM_TOKEN fallback). Ensure both SDK packages are properly configured with trusted publishers on npmjs.com.

If npm registry OIDC configuration doesn't match the workflow context, the OIDC token will be rejected. Verify organization name, repository name, workflow file name, and environment name exactly match the npm package settings.

Before merging, confirm:

  1. The livecodes and livecodes SDK packages have trusted publisher OIDC configured on npmjs.com
  2. The GitHub organization name, repository name, and workflow path (release.yml) exactly match the OIDC config
  3. Test publishing on a dry-run or canary package to verify the setup works (if possible without publishing to production)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 7, 2025

@hatemhosny hatemhosny merged commit 8233cc4 into develop Dec 7, 2025
19 checks passed
@hatemhosny hatemhosny deleted the OIDC branch December 7, 2025 16:34
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.

1 participant