Release flow#2
Merged
Merged
Conversation
…iguration - Changed repository URL format to use 'git+' prefix. - Added 'publishConfig' section to specify public access for npm publishing.
- Added a step to check if the tag is on the main branch before proceeding with the release process. - Set fetch-depth to 0 for the checkout action to ensure all history is available.
Comment on lines
+39
to
+40
| - name: Publish to npm | ||
| run: npm publish --provenance --access public |
There was a problem hiding this comment.
missing NODE_AUTH_TOKEN environment variable - npm publish will fail authentication
Suggested change
| - name: Publish to npm | |
| run: npm publish --provenance --access public | |
| - name: Publish to npm | |
| run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/release.yml
Line: 39-40
Comment:
missing `NODE_AUTH_TOKEN` environment variable - npm publish will fail authentication
```suggestion
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
```
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
Adds automated npm release workflow triggered by version tags, with branch verification and CI checks before publishing. Also updates
package.jsonwith standard repository URL format and public access configuration.NODE_AUTH_TOKENenvironment variable, causing authentication failure during npm publishpackage.jsonchanges are correct and align with npm best practicesConfidence Score: 2/5
NODE_AUTH_TOKENenvironment variable means npm publish will fail. The package.json changes are fine, but the workflow is non-functional without the fix..github/workflows/release.ymlrequires immediate attention - add authentication tokenImportant Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Push tag v*] --> B[Checkout code with full history] B --> C{Verify tag is on main branch} C -->|Not on main| D[Fail with error] C -->|On main| E[Setup pnpm & Node 22] E --> F[Install latest npm] F --> G[Install dependencies] G --> H[Run CI checks] H -->|Checks fail| I[Stop workflow] H -->|Checks pass| J[Publish to npm with provenance] J --> K[Release complete]Last reviewed commit: 22d65b6