chore: add release-please for automated releases#34
Conversation
Replaces the manual release flow with release-please, matching the authkit-tanstack-start configuration. Modifies release.yml to be callable via workflow_call from the new release-please workflow.
Greptile SummaryThis PR introduces automated releases via release-please, replacing the manual GitHub-release–triggered publish flow with a bot-driven PR workflow that chains into the existing
Confidence Score: 4/5The release pipeline wiring is largely correct, but the publish job will not receive the npm authentication secret it needs when invoked via workflow_call, and the pre-release tagging guard has been removed — both of which affect the first real release attempt. The core release orchestration is sound and the config files are correct. However, the reusable-workflow call in release-please.yml does not forward secrets to release.yml, so any secret-dependent publish step (e.g. NODE_AUTH_TOKEN) will be unavailable at runtime. Additionally, the explicit pre-release / latest conditional was dropped, meaning a manually dispatched run from a pre-release branch would publish under the latest dist-tag. .github/workflows/release-please.yml and .github/workflows/release.yml — the secret-forwarding and dist-tag logic live here. Important Files Changed
|
| publish: | ||
| needs: release-please | ||
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | ||
| uses: ./.github/workflows/release.yml |
There was a problem hiding this comment.
Missing
secrets: inherit in reusable workflow call
When a reusable workflow is invoked via workflow_call, GitHub does not automatically pass repository secrets to the callee — secrets must be explicitly forwarded with secrets: inherit (or enumerated in a secrets: block). If release.yml relies on any secret (e.g. an NPM_TOKEN / NODE_AUTH_TOKEN for npm authentication), the publish job will fail with an auth error on every release-please-triggered release, silently not publishing the package.
There was a problem hiding this comment.
Not needed — this repo uses npm trusted publishing (OIDC) via the id-token: write permission + --provenance flag. There is no NPM_TOKEN secret to inherit. Same pattern as authkit-tanstack-start.
| - name: Publish | ||
| run: pnpm publish --tag latest --access=public --provenance --no-git-checks |
There was a problem hiding this comment.
Pre-release version always published as
latest
The old workflow conditionally used --tag next when the triggering GitHub release was marked as a pre-release. That guard is now removed — every publish, including one triggered manually via workflow_dispatch on a branch that has a pre-release version string (e.g. 0.6.0-alpha.1), will land on npm as --tag latest. Users who run npm install authkit-session (or any tool that resolves latest) would receive the pre-release build.
| - name: Publish | |
| run: pnpm publish --tag latest --access=public --provenance --no-git-checks | |
| - name: Publish | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if [[ "$VERSION" == *"-"* ]]; then | |
| pnpm publish --tag next --access=public --provenance --no-git-checks | |
| else | |
| pnpm publish --tag latest --access=public --provenance --no-git-checks | |
| fi |
There was a problem hiding this comment.
Release-please controls what versions get published — pre-release versions only land if explicitly configured in release-please. The workflow_dispatch path is a manual escape hatch, not a regular flow. This matches authkit-tanstack-start which also uses unconditional --tag latest.
- release-please-action v4 → v5 (node24 upgrade) - create-github-app-token v2 → v3 - action-semantic-pull-request v6 (new workflow, matches authkit-nextjs)
Summary
release.ymlto trigger viaworkflow_call(from release-please) instead ofrelease: published(manual GitHub releases)action-semantic-pull-request, matching authkit-nextjs0.5.1What changes
release-please-config.json.release-please-manifest.json0.5.1.github/workflows/release-please.yml.github/workflows/release.ymlrelease: published→workflow_call+workflow_dispatch.github/workflows/lint-pr-title.ymlaction-semantic-pull-requestv6Pinned action versions
googleapis/release-please-action45996ed1...actions/create-github-app-tokenbcd2ba49...amannn/action-semantic-pull-request48f25628...Prerequisites
SDK_BOT_APP_IDvar andSDK_BOT_PRIVATE_KEYsecret must be configured in the repo settings (same as authkit-tanstack-start)Test plan
SDK_BOT_APP_IDandSDK_BOT_PRIVATE_KEYare set in repo settings