-
-
Notifications
You must be signed in to change notification settings - Fork 4
Fix/release script #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ on: | |
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release: | ||
|
|
@@ -22,11 +23,17 @@ jobs: | |
| with: | ||
| node-version: '20' | ||
| cache: 'pnpm' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm build | ||
| - run: pnpm build:action | ||
|
|
||
| - name: Publish to npm | ||
| run: npm publish --provenance --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Published npm package will exclude dist/ build outputHigh Severity The npm publish step will produce a broken package. The |
||
|
|
||
| - name: Get version info | ||
| id: version | ||
| run: | | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The release workflow may publish a different version to npm than what is specified in the git tag, causing a version mismatch between npm and the GitHub release.
Severity: MEDIUM
Suggested Fix
Add a validation step to the workflow before the
npm publishcommand. This step should extract the version frompackage.jsonand compare it with the version from the git tag ($GITHUB_REF_NAME). If the versions do not match, the workflow should fail to prevent the inconsistent release.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.