Commit 0423941

Anton Golub <antongolub@antongolub.com>
2025-03-21 17:58:37
build: fix dev version resolver (#1146)
1 parent e738502
Changed files (1)
.github
.github/workflows/dev-publish.yml
@@ -47,7 +47,9 @@ jobs:
           node-version: 22
           cache: 'npm'
       - name: Set zx version
-        run: echo "ZX_VERSION=$(node --eval='console.log(require(\'./package.json\').version)')\nSHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+        run: |
+          echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+          echo 'ZX_VERSION=$(npm pkg get version | tr -d \")' >> $GITHUB_ENV
 
       - run: echo "//wombat-dressing-room.appspot.com/:_authToken=$AUTH_TOKEN" >> .npmrc
         env:
@@ -97,7 +99,9 @@ jobs:
           name: build-${{ github.run_id }}
 
       - name: Set zx version
-        run: echo "ZX_VERSION=$(node --eval='console.log(require(\'./package.json\').version)')\nSHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+        run: |
+          echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
+          echo 'ZX_VERSION=$(npm pkg get version | tr -d \")' >> $GITHUB_ENV
 
       # Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
       - name: Log in to the Container registry