From f1cafd49596e8957ac436a3c7cb7b2645ff86417 Mon Sep 17 00:00:00 2001 From: Enrico Sacchetti Date: Fri, 12 Jan 2024 13:44:20 -0500 Subject: [PATCH] build: set up separate publish jobs (#1887) --- .github/workflows/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6ef7e669f..3f62ef2315 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,13 +15,22 @@ jobs: with: node-version: "18.x" registry-url: "https://registry.npmjs.org" - - name: Publish package + - name: Build + run: | + npm install --force + npm run build:docs & npm run build:lib + - name: Publish package (stable) + if: ${{ ! contains(github.ref, '-next') }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # Currently, only npm supports publishing packages with provenance # https://docs.npmjs.com/generating-provenance-statements run: | - npm install --force - npm run build:docs & npm run build:lib npm publish --provenance --access public + - name: Publish package (next) + if: ${{ contains(github.ref, '-next') }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + run: | + npm publish --provenance --access public --tag next