Conversation
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors the release pipeline to create GitHub Releases and then publish the corresponding version to npm via a reusable workflow.
Changes:
- Convert npm publish workflow to a
workflow_callreusable workflow that accepts aversioninput. - Expose the created tag from main/dev release workflows as a job output and trigger npm publishing as a dependent job.
- Update publish workflow to checkout the tag/ref and set
package.jsonversion dynamically before publishing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/release-package.yml | Converts publish flow into a reusable workflow and sets version dynamically prior to npm publish. |
| .github/workflows/main-release.yml | Adds tag output and invokes reusable npm publish workflow after creating the GitHub Release. |
| .github/workflows/dev-release.yml | Adds dev tag output and invokes reusable npm publish workflow after creating the prerelease. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| outputs: | ||
| tag: ${{ steps.create_tag.outputs.TAG }} |
There was a problem hiding this comment.
The job output references steps.create_tag.outputs.TAG, but the create_tag step never writes TAG to $GITHUB_OUTPUT. As a result, needs.tag-release.outputs.tag will be empty and downstream jobs will receive a blank version. Fix by emitting the output from the step (e.g., write tag=$TAG to $GITHUB_OUTPUT) and reference the correct output key consistently (prefer lowercase tag).
| - name: Create release tag | ||
| id: create_tag | ||
| run: | | ||
| VERSION=$(jq -r '.version' package.json) | ||
| TAG="${VERSION}" |
There was a problem hiding this comment.
The job output references steps.create_tag.outputs.TAG, but the create_tag step never writes TAG to $GITHUB_OUTPUT. As a result, needs.tag-release.outputs.tag will be empty and downstream jobs will receive a blank version. Fix by emitting the output from the step (e.g., write tag=$TAG to $GITHUB_OUTPUT) and reference the correct output key consistently (prefer lowercase tag).
| outputs: | ||
| tag: ${{ steps.create_tag.outputs.TAG }} |
There was a problem hiding this comment.
Same issue as main-release.yml: steps.create_tag.outputs.TAG is referenced, but the step does not publish any outputs to $GITHUB_OUTPUT. This will make the called publish workflow receive an empty version input. Emit the tag as a step output and reference that output key.
| - name: Create dev tag | ||
| id: create_tag | ||
| run: | | ||
| SHA=$(git rev-parse --short HEAD) | ||
| VERSION=$(jq -r '.version' package.json) |
There was a problem hiding this comment.
Same issue as main-release.yml: steps.create_tag.outputs.TAG is referenced, but the step does not publish any outputs to $GITHUB_OUTPUT. This will make the called publish workflow receive an empty version input. Emit the tag as a step output and reference that output key.
| publish-npm: | ||
| needs: tag-release | ||
| uses: ./.github/workflows/publish-npm.yml | ||
| with: | ||
| version: ${{ needs.tag-release.outputs.tag }} |
There was a problem hiding this comment.
In the dev flow, the tag that gets passed downstream is typically a non-semver dev tag (based on the earlier step that builds TAG from commit SHA + version). That value is later used as the npm package version (via npm version ${{ inputs.version }} in the reusable publish workflow), but npm version requires a valid semver. This will fail for tags like dev-1.2.3-abc123. Consider passing two separate values: a ref to checkout (the git tag) and a package_version that is valid semver (e.g., 1.2.3-dev.0+abc123), or generate a semver-compliant prerelease version when creating the dev tag.
|
|
||
| publish-npm: | ||
| needs: tag-release | ||
| uses: ./.github/workflows/publish-npm.yml |
There was a problem hiding this comment.
This workflow calls ./.github/workflows/publish-npm.yml, but the changed reusable workflow file shown in this PR is .github/workflows/release-package.yml. If the file wasn’t also renamed/added elsewhere, the uses: reference will fail at runtime. Align the called workflow path with the actual reusable workflow filename.
| uses: ./.github/workflows/publish-npm.yml | |
| uses: ./.github/workflows/release-package.yml |



No description provided.