From 750af75d40c62089cd566d448d1978586d8e06b5 Mon Sep 17 00:00:00 2001 From: mehdi Date: Thu, 21 Oct 2021 18:17:01 +0200 Subject: [PATCH] fix publish label --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bca7370..75cb9b1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: - run: npm ci - run: npm run prepublishOnly - id: get_npm_label - run: if (npx semver ${{ github.event.release.tag_name }} --range '>0.0.0'); then echo ::set-output name=NPM_LABEL::latest; else echo ::set-output name=NPM_LABEL::beta; fi; # Using the fact that semver by default considers that pre-releases do not respect stable ranges + run: if (npx semver $(node -p "require('./package.json').version") --range '>0.0.0'); then echo ::set-output name=NPM_LABEL::latest; else echo ::set-output name=NPM_LABEL::beta; fi; # Using the fact that semver by default considers that pre-releases do not respect stable ranges - run: npm publish --tag=${NPM_LABEL} --access public env: NPM_LABEL: ${{ steps.get_npm_label.outputs.NPM_LABEL }}