From 54e77221ebec85451036ccbba49fa8ca1bf7a50b Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 20 Jan 2022 16:27:01 +0000 Subject: [PATCH] chore: fix publish command --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1bf32e69..5b99fcad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -114,13 +114,13 @@ jobs: with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm publish + - if: ${{ steps.release.outputs.release_created }} + run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ steps.release.outputs.release_created }} - - run: | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - if: ${{ !steps.release.outputs.release_created }} + run: | npm version `node -p -e "require('./package.json').version"`-`git rev-parse --short HEAD` --no-git-tag-version npm publish --tag next env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ !steps.release.outputs.release_created }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}