Repository navigation
ci(cli-auth): add main/publish workflows and rename package to cli-auth - #15
Merged
Merged
Conversation
Add GitHub Actions workflows for continuous integration and npm publishing, plus the publishing metadata (`publishConfig`, `repository`, `prepack`) required for the scoped `@logto-io/cli-auth` package.
Use the unscoped `cli-auth` name that was registered on npm. Drop the now-unnecessary `publishConfig.access: public` (unscoped packages are public by default) and update all imports, workspace dependencies, and docs accordingly.
The `silverhand-io/actions-node-pnpm-run-steps` action always forwards a `pnpm-version` input to `pnpm/action-setup@v4`, which rejects mismatches against the `packageManager` field in `package.json`. Bump the local declaration to `pnpm@10.8.0` so both sources agree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/main.yml: runsbuild,typecheck, andteston every push tomasterand every PR, across Node 22 and 24..github/workflows/publish.yml: publishescli-authto npm with provenance onv*.*.*tags (or manualworkflow_dispatch).@logto-io/cli-auth→cli-auth(unscoped, matching the npm-registered name). Updates all imports, the samples workspace dep, and the README.prepackscript +repositoryfield topackages/cli-auth/package.jsonfor clean npm publishes.Required repo configuration (action items for maintainers)
Before the publish workflow can run successfully, a maintainer must add one secret to the repo:
NPM_AUTOMATION_TOKEN— an npm Automation access token with publish rights to thecli-authpackage. Add it under Settings → Secrets and variables → Actions → New repository secret.Provenance signing (
--provenance) uses GitHub's OIDC token, which is already granted viapermissions.id-token: writein the workflow — no extra setup needed.Release flow
Once the secret is configured, a release is cut by:
packages/cli-auth/package.json(currently0.0.0) via a regular PR.git tag v0.1.0 && git push origin v0.1.0.cli-authwith a provenance attestation.workflow_dispatchis available as a fallback for manual runs.Test plan
pnpm -r buildpasses locallypnpm -r typecheckpasses locallypnpm -r testpasses locally (138 tests)cli-authvia workspace after rename (pnpm installclean)Mainworkflow runs green onmasterNPM_AUTOMATION_TOKENsecretworkflow_dispatchto confirm the publish job works end-to-end