From 837d5f9eae54c6291c9c5b5bf0b5cacd7020bda2 Mon Sep 17 00:00:00 2001 From: Ales Rechtorik Date: Wed, 7 Oct 2020 17:46:44 +0200 Subject: [PATCH] fix version package.json replace --- .github/workflows/tag.yml | 2 +- tools/npm/binary.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index f6e40e6a..7c2acf03 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -71,7 +71,7 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm ci --ignore-scripts - run: npm i -g replace-in-files-cli - - run: replace-in-files --string='v0.0.0-zerops' --replacement='v${{ github.event.release.tag_name }}' package.json + - run: replace-in-files --string='v0.0.0-zerops' --replacement='${{ github.event.release.tag_name }}' package.json - run: npm publish --access=public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/tools/npm/binary.js b/tools/npm/binary.js index 747acc74..6ec0420d 100755 --- a/tools/npm/binary.js +++ b/tools/npm/binary.js @@ -15,7 +15,7 @@ function getPlatform() { function getBinary() { const platform_arch = getPlatform(); const version = require("../../package.json").version; - const url = `https://github.com/zeropsio/zcli/releases/download/${version}/zcli-${platform_arch}.tar.gz`; + const url = `https://github.com/zeropsio/zcli/releases/download/v${version}/zcli-${platform_arch}.tar.gz`; const name = `zcli-${platform_arch}`; return new Binary(url, { name }); }