From 21c93bba010fe172dea1de83f7c1a79da0debf88 Mon Sep 17 00:00:00 2001 From: Abhishek Jain Date: Sun, 11 Jan 2026 15:43:01 +0100 Subject: [PATCH] fix: Fix release workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c72a3f..7a15ffc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: # Get versions CURRENT_VERSION=$(node -p "require('./package.json').version") - OLD_VERSION=$(git show main:package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf-8')).version") + OLD_VERSION=$(git show main:package.json | node -p "JSON.parse(require('fs').readFileSync(0).toString()).version") if [ "$CURRENT_VERSION" != "$OLD_VERSION" ]; then echo "Version bumped from $OLD_VERSION to $CURRENT_VERSION" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a23e0b6..7863ec6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,13 @@ jobs: - name: Publish to GitHub Packages run: | - pnpm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }} pnpm publish --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + VERSION=$(node -p "require('./package.json').version") + gh release create v$VERSION --generate-notes