Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions .circleci/config.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [24.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm install
- run: npm run build --if-present
- run: npm run lint
- run: npm test
env:
CI: true
# - name: Publish to npm
# uses: pascalgn/[email protected]
63 changes: 63 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

on:
#push:
# branches:
# - main

# Only run if the general build for the main branch has completed
workflow_run:
workflows: ["Build and Test"]
branches: [main]
types:
- completed

jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.test }}
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

The output references 'steps.version.outputs.test' but there is no step with id 'version'. The step that generates version output has id 'release', so this should be 'steps.release.outputs.version'.

Suggested change
version: ${{ steps.version.outputs.test }}
version: ${{ steps.release.outputs.version }}

Copilot uses AI. Check for mistakes.


steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
# - name: Lint
# run: npm run lint-fix
# - name: Test
# run: npm run test:unit --if-present
- name: Build
run: npm run build
- name: Release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
npx semantic-release
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

The command 'npx semantic-release --version' returns the semantic-release tool version, not the released package version. This should capture the actual version released by semantic-release, typically through parsing its output or using a semantic-release plugin that sets the version as an output.

Suggested change
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
RELEASE_OUTPUT=$(npx semantic-release)
VERSION=$(echo "$RELEASE_OUTPUT" | grep -Eo 'Published release v[0-9]+\.[0-9]+\.[0-9]+' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
echo "version=$VERSION" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.

- name: GitHub Release update
uses: softprops/action-gh-release@v1
#if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: ${{ github.workspace }}-CHANGELOG.txt
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repoj
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
tag_name: ${{ steps.release.outputs.version }}
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

This references 'steps.release.outputs.version' but the release step doesn't properly set this output. Since semantic-release typically creates tags automatically, this GitHub Release action may be redundant or should use the tag created by semantic-release.

Suggested change
tag_name: ${{ steps.release.outputs.version }}
tag_name: ${{ github.ref_name }}

Copilot uses AI. Check for mistakes.

files: |
LICENSE.md
README.md
lib
package.json