Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,21 @@ jobs:

release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
permissions: {}
if: github.ref_name == 'main'
needs: [lint, test]
needs: [lint, test, windows-test]
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4
- run: yarn
- run: yarn prepack
- run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish to npm

on:
push:
tags:
- 'v[0-9]*'
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The tag trigger pattern 'v[0-9]' is too permissive and will match tags like 'v1', 'v12', etc., not just semantic version tags. Since the semantic-release configuration uses tagFormat 'v${version}' (line 2 of .releaserc.yaml) which produces tags like 'v1.2.3', consider using a more specific pattern like 'v[0-9]+.[0-9]+.[0-9]+' or 'v..' to ensure the publish workflow only triggers on valid semantic version tags.

Suggested change
- 'v[0-9]*'
- 'v*.*.*'

Copilot uses AI. Check for mistakes.

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The publish workflow doesn't specify a Node.js version in the setup-node step, while the package.json requires "node": ">=18" (line 43 of package.json). Consider explicitly setting the node-version to ensure compatibility, for example:

- uses: actions/setup-node@v4
  with:
    node-version: '18'
    registry-url: 'https://registry.npmjs.org'

This ensures the build and publish happen with a supported Node.js version.

Suggested change
with:
with:
node-version: '18'

Copilot uses AI. Check for mistakes.
registry-url: 'https://registry.npmjs.org'
- run: yarn
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The publish workflow is missing the build step before publishing. The package.json specifies that only the /dist directory should be published (line 14-16 in package.json), but /dist is gitignored and needs to be built from TypeScript sources using yarn prepack. Without running yarn prepack before npm publish, the package will be published without the compiled JavaScript files, causing the publish to fail or publish an incomplete package.

Add - run: yarn prepack after the - run: yarn step to compile TypeScript to the /dist directory before publishing.

Suggested change
- run: yarn
- run: yarn
- run: yarn prepack

Copilot uses AI. Check for mistakes.
- run: npm publish --provenance
1 change: 0 additions & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/npm"
- "@semantic-release/git"
- "@semantic-release/github"