Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

permissions:
id-token: write
contents: write

Comment on lines +10 to +13
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Repo workflows consistently scope permissions at the job level (e.g. docs-sync.yml, release-dispatch.yml, claude.yml), but this workflow sets them at the top level. Keeping id-token: write scoped to just the publishing job reduces blast radius if more jobs are added later; consider moving this permissions block under jobs.publish.permissions (and defaulting workflow permissions to read).

Copilot uses AI. Check for mistakes.
jobs:
publish:
if:
Expand Down Expand Up @@ -37,15 +41,11 @@ jobs:
if: ${{ github.event.pull_request.head.ref == 'prepare-release' }}
run: |
pnpm release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish prerelease to npm
if: ${{ github.event.pull_request.head.ref == 'prepare-prerelease' }}
run: |
pnpm release:prerelease
Comment on lines 40 to 48
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

With workflow_dispatch enabled, this job can run without a PR context, but both publish steps are gated on github.event.pull_request.head.ref. For manual dispatch runs, these conditions evaluate false and nothing gets published to npm (while later steps still finalize the GitHub release). Consider either removing workflow_dispatch or adding dispatch inputs (e.g. release vs prerelease) and updating the if: conditions to publish when github.event_name == 'workflow_dispatch' (or based on github.ref_name).

Copilot uses AI. Check for mistakes.
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Extract changelog for version
id: get_changelog
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"format": "turbo format lint:fix",
"clean": "git clean -fdX && pnpm store prune",
"ci": "pnpm clean && pnpm i",
"release": "pnpm build && pnpm -r --filter=@cartridge/controller --filter=@cartridge/connector publish --tag latest --no-git-checks --access public",
"release:prerelease": "pnpm build && pnpm -r --filter=@cartridge/controller --filter=@cartridge/connector publish --tag prerelease --no-git-checks --access public",
"release": "pnpm build && pnpm -r --filter=@cartridge/controller --filter=@cartridge/connector publish --tag latest --no-git-checks --access public --provenance",
"release:prerelease": "pnpm build && pnpm -r --filter=@cartridge/controller --filter=@cartridge/connector publish --tag prerelease --no-git-checks --access public --provenance",
"keychain": "pnpm --filter @cartridge/keychain",
"controller": "pnpm --filter @cartridge/controller",
"connector": "pnpm --filter @cartridge/connector",
Expand Down
Loading