Skip to content

Implement GitHub release step in CI workflow#350

Merged
bourgeoa merged 1 commit intomainfrom
release-tag
Mar 29, 2026
Merged

Implement GitHub release step in CI workflow#350
bourgeoa merged 1 commit intomainfrom
release-tag

Conversation

@bourgeoa
Copy link
Copy Markdown
Contributor

Added GitHub release step to CI workflow for automatic versioning and release creation.

Added GitHub release step to CI workflow for automatic versioning and release creation.
Copilot AI review requested due to automatic review settings March 29, 2026 18:00
@bourgeoa bourgeoa enabled auto-merge March 29, 2026 18:00
@bourgeoa bourgeoa merged commit b7da079 into main Mar 29, 2026
9 checks passed
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

Adds an automated GitHub Release creation job to the existing CI workflow, intended to create (or reuse) a vX.Y.Z tag/release from the package.json version after a successful publish to npm on pushes to main.

Changes:

  • Introduces a new github-release job that runs after npm-publish-latest on push to main.
  • Computes a release tag from package.json and uses gh release to create the release (skipping if it already exists).
  • Handles both “tag already exists” and “tag missing” cases when creating the release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +109 to +112
- name: Compute release tag from package version
id: release_tag
run: echo "tag=v$(node -p \"require('./package.json').version\")" >> "$GITHUB_OUTPUT"

Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The release_tag step writes an output (tag=...) but that output is never consumed; the tag is recomputed again in the next step. Either reference steps.release_tag.outputs.tag in the release creation step, or remove this step to avoid duplication/confusion.

Copilot uses AI. Check for mistakes.
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v$(node -p "require('./package.json').version")"
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

TAG is derived from package.json again here instead of using the previously computed output. This duplication increases the chance of the tag computation drifting over time (e.g., if the version source changes). Prefer using the earlier computed value consistently.

Suggested change
TAG="v$(node -p "require('./package.json').version")"
TAG="${{ steps.release_tag.outputs.tag }}"

Copilot uses AI. Check for mistakes.
permissions:
contents: write
steps:
- uses: actions/checkout@v6
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

actions/checkout is referenced by a mutable major tag (@v6). For stronger supply-chain security and reproducibility, pin this action to a specific commit SHA (or at least a well-known stable major used elsewhere in the org) rather than a floating major tag.

Suggested change
- uses: actions/checkout@v6
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.2

Copilot uses AI. Check for mistakes.
@bourgeoa bourgeoa deleted the release-tag branch March 29, 2026 19:55
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