Skip to content

ci: fix bump-version workflow (GITHUB_TOKEN, push to main) - #32

Merged
arv merged 1 commit into
mainfrom
arv/fix-bump-version
Jun 3, 2026
Merged

ci: fix bump-version workflow (GITHUB_TOKEN, push to main)#32
arv merged 1 commit into
mainfrom
arv/fix-bump-version

Conversation

@arv

@arv arv commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Problem

The bump-version workflow failed at checkout with:

##[error]Input required and not supplied: token

Two bugs inherited from the upstream better-sqlite3 fork:

  1. actions/checkout used token: ${{ secrets.PAT }}, but no PAT secret is configured in this repo (the repo has no secrets at all since the switch to OIDC trusted publishing). The empty token made checkout fail.
  2. The push targeted master:master, but this repo's default branch is main.

Fix

  • Drop the PAT requirement: use the built-in GITHUB_TOKEN with permissions: contents: write.
  • Push the version commit to main (was master).

Release flow note

Pushes made with GITHUB_TOKEN intentionally do not trigger downstream workflows, so this job only bumps the version + pushes the tag. To publish to npm (with provenance), create a GitHub Release from the new tag — that fires the release event the publish job listens for (npm publish --provenance).

If you'd prefer the bump to auto-create the release and trigger publish end-to-end, that needs a PAT or GitHub App token (GITHUB_TOKEN can't cascade) — happy to wire that up as a follow-up.

Note

If main is a protected branch requiring PRs, the direct push from this job will be rejected; that's a repo-settings consideration, not a workflow one.

🤖 Generated with Claude Code

The bump-version workflow failed at checkout with "Input required and not
supplied: token" because it referenced secrets.PAT, which is not configured
in this repo (inherited from the upstream better-sqlite3 fork). It also pushed
to `master`, but this repo's default branch is `main`.

- Drop the PAT: use the built-in GITHUB_TOKEN with `contents: write`.
- Push the version commit to `main` (was `master`).

Pushes made with GITHUB_TOKEN don't trigger downstream workflows, so the npm
release is still created manually — which fires the `release` event the
publish job (npm publish --provenance) listens for.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arv
arv merged commit 6435e06 into main Jun 3, 2026
59 of 60 checks passed
@arv
arv deleted the arv/fix-bump-version branch June 3, 2026 06:30
@arv
arv requested a review from tantaman June 3, 2026 06:30
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