Skip to content

Automated npm releases from main - #18

Merged
amansoomro062 merged 1 commit into
mainfrom
chore/release-workflow
Aug 14, 2026
Merged

Automated npm releases from main#18
amansoomro062 merged 1 commit into
mainfrom
chore/release-workflow

Conversation

@amansoomro062

Copy link
Copy Markdown
Owner

On every push to main the workflow compares the package.json version against the npm registry and publishes when it is new. Release ritual becomes: bump the version, merge to main.

  • npm trusted publishing via OIDC, so there is no token secret to create, rotate, or leak
  • provenance attestation comes automatically with OIDC publishing, finishing the last item on Pre-launch: CI, SECURITY.md, and npm provenance #11
  • prepublishOnly still gates every publish behind typecheck, tests, and build
  • pushes without a version bump (like this one) are a no-op, the workflow just logs and exits

One-time setup needed before this works (npm side, about a minute):

  1. npmjs.com -> package 2fa-kit -> Settings -> Trusted Publisher
  2. Choose GitHub Actions, set repository amansoomro062/2fa-kit and workflow release.yml

Until that is configured, a version-bump push will fail the publish step with an auth error, nothing worse.

Release workflow: on every push to main, compare package.json version with
the npm registry and publish when it is new. Publishing uses npm trusted
publishing (OIDC), so no token secret, and provenance comes with it.
prepublishOnly still gates every publish behind typecheck, tests, and build.

Closes the provenance item on #11.
@amansoomro062
amansoomro062 merged commit 546a959 into main Aug 14, 2026
3 checks passed
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