From 280bb1b1f6c1baeda79846785c25bc5b686e780c Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 20 Jan 2022 14:24:06 +0000 Subject: [PATCH] chore: autopublish next version (#1129) If we aren't releasing a version on a given release run, publish an rc under the `next` tag instead. --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c447290..75c46c01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -114,7 +114,6 @@ jobs: - uses: actions/setup-node@v2 with: node-version: lts/* - registry-url: 'https://registry.npmjs.org' if: ${{ steps.release.outputs.release_created }} - uses: ipfs/aegir/actions/cache-node-modules@master if: ${{ steps.release.outputs.release_created }} @@ -122,3 +121,9 @@ jobs: env: 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 }}