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