mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
build: set up separate publish jobs
One for stable and one for next tags.
This commit is contained in:
parent
3bd943d12c
commit
81dc354c14
1 changed files with 26 additions and 1 deletions
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
@ -4,7 +4,8 @@ on:
|
|||
- "v*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-stable:
|
||||
if: ${{ ! contains(github.ref, '-next') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -25,3 +26,27 @@ jobs:
|
|||
npm install --force
|
||||
npm run build:docs & npm run build:lib
|
||||
npm publish --provenance --access public
|
||||
|
||||
# Publish with `next` tag
|
||||
build-next:
|
||||
if: ${{ contains(github.ref, '-next') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- name: Publish package
|
||||
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 --tag next
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue