From e6bc1bb1f1fcb08972849c7161162ef3e96e317c Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Sat, 31 Dec 2022 13:52:07 +0800 Subject: [PATCH] If publishing a branch outside of main, tag as next --- .github/workflows/publish.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 78781940..b83c23c7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,13 +42,22 @@ jobs: git add . git commit -m "${{ github.event.release.tag_name }}" - - name: Publish + - name: Publish Main + if: ${{ github.ref == 'refs/heads/main'}} env: NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} pnpm -F @ensdomains/thorin publish + - name: Publish Next + if: ${{ github.ref != 'refs/heads/main'}} + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} + pnpm -F @ensdomains/thorin publish --tag next --no-git-checks + - name: Push changes run: git push env: