ci(build): Make CI only deploy one package at a time

This commit is contained in:
Jesse Wierzbinski 2024-05-14 09:10:56 -10:00
parent 407e57fe34
commit 8028983faa
No known key found for this signature in database

View file

@ -7,12 +7,20 @@ on:
version:
description: "Version to publish"
required: true
type: string
# Default to truncated commit hash
default: "0.0.0"
tag:
description: "Tag to publish"
required: true
type: string
default: "latest"
package:
description: "Package to publish"
options:
- federation
type: choice
required: true
permissions:
contents: read
@ -40,10 +48,10 @@ jobs:
run: bun run build
- name: Change version in package.json to ${{ github.event.inputs.version }}, defaulting to the truncated commit hash
run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json federation/package.json federation/jsr.jsonc'
run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json ${{ github.event.inputs.package }}/package.json ${{ github.event.inputs.package }}/jsr.jsonc'
- name: Publish to NPM
run: bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }}
- name: Publish to JSR
run: cd federation && bunx jsr publish --allow-slow-types --allow-dirty
run: cd ${{ github.event.inputs.package }} && bunx jsr publish --allow-slow-types --allow-dirty