Skip to content

feat(ci): automatic release created#94

Merged
Tweentyy merged 1 commit intomainfrom
develop
Apr 7, 2026
Merged

feat(ci): automatic release created#94
Tweentyy merged 1 commit intomainfrom
develop

Conversation

@Tweentyy
Copy link
Copy Markdown
Contributor

@Tweentyy Tweentyy commented Apr 7, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 17:30
@Tweentyy Tweentyy merged commit 4bb535b into main Apr 7, 2026
1 check passed
@Tweentyy Tweentyy deleted the develop branch April 7, 2026 17:30
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_call reusable workflow that accepts a version input.
  • 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.json version 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.

Comment on lines +11 to +12
outputs:
tag: ${{ steps.create_tag.outputs.TAG }}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines 17 to 21
- name: Create release tag
id: create_tag
run: |
VERSION=$(jq -r '.version' package.json)
TAG="${VERSION}"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
outputs:
tag: ${{ steps.create_tag.outputs.TAG }}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 16 to 20
- name: Create dev tag
id: create_tag
run: |
SHA=$(git rev-parse --short HEAD)
VERSION=$(jq -r '.version' package.json)
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +39
publish-npm:
needs: tag-release
uses: ./.github/workflows/publish-npm.yml
with:
version: ${{ needs.tag-release.outputs.tag }}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.

publish-npm:
needs: tag-release
uses: ./.github/workflows/publish-npm.yml
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
uses: ./.github/workflows/publish-npm.yml
uses: ./.github/workflows/release-package.yml

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants