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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [18, 20, 22]
node-version: [20, 22, 24]

steps:
- name: Checkout
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,34 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Verify tag is on main
run: |
git fetch origin main
if git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "Tag commit is on main. Proceeding with release."
else
echo "Error: Tag commit is not on main. Aborting release."
exit 1
fi

- name: Verify package.json version matches tag
run: |
PKG_VERSION="v$(node -p 'require("./package.json").version')"
TAG_VERSION="${GITHUB_REF_NAME}"
echo "package.json version: $PKG_VERSION"
Comment thread
madkoo marked this conversation as resolved.
echo "Git tag: $TAG_VERSION"
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
echo "Error: package.json version ($PKG_VERSION) does not match git tag ($TAG_VERSION)."
exit 1
fi

- name: Setup Node.js
uses: actions/setup-node@v6
Comment thread
madkoo marked this conversation as resolved.
with:
node-version: '20'
node-version: '24'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

Expand All @@ -35,7 +58,7 @@ jobs:
run: npm pack

- name: Publish to npm
run: npm publish --access public
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
Loading