From c9a4b22a2729e607d66fe218e17f85f7c2440c83 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Tue, 14 May 2024 22:08:48 +0100 Subject: [PATCH] chore: allow publishing prereleases (#295) --- .github/workflows/npm-publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 9f8c00f..b7e1388 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,7 +5,7 @@ name: Publish to npm on: release: - types: [created] + types: [published] jobs: build: @@ -35,6 +35,11 @@ jobs: - run: npm version ${TAG_NAME} --git-tag-version=false env: TAG_NAME: ${{ github.ref_name }} + - run: npm publish --provenance --access public --tag next + if: "github.event.release.prerelease" + env: + NODE_AUTH_TOKEN: ${{ secrets.npm_secret }} - run: npm publish --provenance --access public + if: "!github.event.release.prerelease" env: NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}