From 91a920d16101dfcd044dfb2ec597aa1ed6c0cf02 Mon Sep 17 00:00:00 2001 From: Matt Yoder Date: Mon, 30 Sep 2024 14:04:32 -0400 Subject: [PATCH] ci(create-release): add support for prerelease publishing --- .github/workflows/create-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 6ca9cfe..fe70e74 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -43,6 +43,9 @@ jobs: run: npm ci - name: Build assets run: npm run build - - run: npm publish --provenance --access public + - name: Determine NPM tag + id: npm-tag + run: echo npm-tag=$(jq -r .version package.json | grep -q 'alpha\|beta\|rc' && echo "next" || echo "latest") >> $GITHUB_OUTPUT + - run: npm publish --provenance --access public --tag ${{ steps.npm-tag.outputs.npm-tag }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}