From ade0ba417d3fec9c111776ab7d5f33808f8b91d2 Mon Sep 17 00:00:00 2001 From: eli Date: Mon, 10 Nov 2025 08:35:50 -0600 Subject: [PATCH] fix the publisher CI --- .github/workflows/npm-publish.yml | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 9c5f3a7f..12957d83 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -34,6 +34,16 @@ jobs: with: node-version: 20 registry-url: https://registry.npmjs.org/ + - name: Extract version from release tag + id: get_version + run: | + VERSION=${GITHUB_REF#refs/tags/} + VERSION=${VERSION#v} + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Publishing version: $VERSION" + - name: Update package.json version + run: | + sed -i 's/"version": "0.0.0-placeholder"/"version": "${{ steps.get_version.outputs.version }}"/' package.json - run: npm ci - name: Download build artifacts uses: actions/download-artifact@v4 diff --git a/package.json b/package.json index e0f002d8..bba8a2e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@permitio/cli", - "version": "0.2.8", + "version": "0.0.0-placeholder", "description": "Permit CLI is an open-source command-line tool that empowers developers to manage, test, and automate fine-grained access control across applications.", "license": "MIT", "bin": {