feat: trusted publishers by NathanWalker · Pull Request #41 · NativeScript/napi-android · GitHub
Skip to content

feat: trusted publishers#41

Merged
NathanWalker merged 1 commit into
mainfrom
feat/engine-variant-publish-flow
Jun 26, 2026
Merged

feat: trusted publishers#41
NathanWalker merged 1 commit into
mainfrom
feat/engine-variant-publish-flow

Conversation

@NathanWalker

@NathanWalker NathanWalker commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Trusted NPM releases of Android engine packages.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

@NathanWalker NathanWalker marked this pull request as ready for review June 26, 2026 02:34
Copilot AI review requested due to automatic review settings June 26, 2026 02:34
@NathanWalker NathanWalker merged commit 8b7d0d5 into main Jun 26, 2026
6 checks passed
@NathanWalker NathanWalker deleted the feat/engine-variant-publish-flow branch June 26, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Enables trusted (OIDC) npm publishing for engine-specific NativeScript Android runtime packages by adding a dedicated GitHub Actions workflow and introducing per-engine package metadata, alongside script updates to resolve versions/tags per target.

Changes:

  • Added npm_trusted_release.yml workflow to build and publish per-engine packages (with matrix support and provenance).
  • Updated helper scripts to resolve current version and npm dist-tag based on an engine “target” package.
  • Added package scaffolding (README/package.json/LICENSE) for each engine package under packages/.

Reviewed changes

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

Show a summary per file
File Description
scripts/get-npm-tag.js Resolves version by target package and computes npm dist-tag from semver prerelease.
scripts/get-next-version.js Resolves current version by target package for prerelease version generation.
packages/android-v8/README.md Adds engine-package README for V8.
packages/android-v8/package.json Adds package metadata for @nativescript/android-v8.
packages/android-v8/LICENSE Adds Apache-2.0 license file for the V8 package.
packages/android-shermes/README.md Adds engine-package README for Static Hermes.
packages/android-shermes/package.json Adds package metadata for @nativescript/android-shermes.
packages/android-shermes/LICENSE Adds Apache-2.0 license file for the shermes package.
packages/android-quickjs/README.md Adds engine-package README for QuickJS.
packages/android-quickjs/package.json Adds package metadata for @nativescript/android-quickjs.
packages/android-quickjs/LICENSE Adds Apache-2.0 license file for the QuickJS package.
packages/android-quickjs-ng/README.md Adds engine-package README for QuickJS-ng.
packages/android-quickjs-ng/package.json Adds package metadata for @nativescript/android-quickjs-ng.
packages/android-quickjs-ng/LICENSE Adds Apache-2.0 license file for the QuickJS-ng package.
packages/android-primjs/README.md Adds engine-package README for PrimJS.
packages/android-primjs/package.json Adds package metadata for @nativescript/android-primjs.
packages/android-primjs/LICENSE Adds Apache-2.0 license file for the PrimJS package.
packages/android-jsc/README.md Adds engine-package README for JavaScriptCore.
packages/android-jsc/package.json Adds package metadata for @nativescript/android-jsc.
packages/android-jsc/LICENSE Adds Apache-2.0 license file for the JSC package.
packages/android-hermes/README.md Adds engine-package README for Hermes.
packages/android-hermes/package.json Adds package metadata for @nativescript/android-hermes.
packages/android-hermes/LICENSE Adds Apache-2.0 license file for the Hermes package.
LICENSE Updates repository license text.
.github/workflows/npm_trusted_release.yml Adds trusted (OIDC) build + publish workflow for engine packages with matrix support.
Comments suppressed due to low confidence (1)

scripts/get-next-version.js:37

  • currentVersion is only checked for truthiness, but not validated as a semver string. If it’s non-empty but invalid, setPreRelease() will throw when it tries to access parsed.major from a null parse result. Validating semver early gives a clearer failure mode.
const currentVersion = resolveCurrentVersion();

if (!currentVersion) {
  throw new Error("Invalid current version");
}

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

Comment thread scripts/get-npm-tag.js
Comment on lines 30 to +34
function validateNpmTag(version) {
const parsed = semver.parse(version);
return (
parsed.prerelease.length === 0 || /^[a-zA-Z]+$/.test(parsed.prerelease[0])
parsed.prerelease.length === 0 ||
(typeof parsed.prerelease[0] === "string" &&
Comment on lines +196 to +199
# Stamp the package identity into the root package.json so Gradle bakes the
# correct name + version straight into the dist tarball.
npm pkg set name="$PACKAGE_NAME" version="$NPM_VERSION"

Comment thread LICENSE
Comment on lines +1 to +4
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.

2 participants