Skip to content

Add GitHub release step to CI workflow#173

Merged
bourgeoa merged 1 commit into
mainfrom
bourgeoa-patch-1
Mar 30, 2026
Merged

Add GitHub release step to CI workflow#173
bourgeoa merged 1 commit into
mainfrom
bourgeoa-patch-1

Conversation

@bourgeoa
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 30, 2026 14:31
@bourgeoa bourgeoa enabled auto-merge March 30, 2026 14:31
@bourgeoa bourgeoa merged commit 325c707 into main Mar 30, 2026
8 checks passed
Copy link
Copy Markdown
Contributor

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 a post-publish GitHub Release job to the CI workflow so that pushes to main can automatically create a GitHub Release (with generated notes) after publishing to npm.

Changes:

  • Introduce a new github-release job that runs after npm-publish-latest on main pushes.
  • Create (or reuse) a v<package.json version> tag and create a GitHub Release with --generate-notes.

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

Comment thread .github/workflows/ci.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v$(node -p "require('./package.json').version")"
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

The TAG assignment uses nested double quotes (TAG="v$(node -p "...")"), which will break bash parsing because the inner quotes terminate the outer quoted string. Use single quotes for the Node expression (or drop the outer quotes / escape the inner quotes) so the workflow can compute TAG correctly.

Suggested change
TAG="v$(node -p "require('./package.json').version")"
TAG=v$(node -p 'require("./package.json").version')

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
github-release:
needs: [npm-publish-latest]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

github-release can run even when the actual npm publish step was skipped (e.g., it’s conditional on github.actor in npm-publish-latest, but this job isn’t). That can produce a GitHub Release/tag for a version that wasn’t published to npm. Consider mirroring the same actor condition here (or keying off an output from npm-publish-latest that indicates whether publishing occurred).

Suggested change
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'

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