mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
ci(build): ✨ Make CI only deploy one package at a time
This commit is contained in:
parent
407e57fe34
commit
8028983faa
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
|
|
@ -7,12 +7,20 @@ on:
|
||||||
version:
|
version:
|
||||||
description: "Version to publish"
|
description: "Version to publish"
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
# Default to truncated commit hash
|
# Default to truncated commit hash
|
||||||
default: "0.0.0"
|
default: "0.0.0"
|
||||||
tag:
|
tag:
|
||||||
description: "Tag to publish"
|
description: "Tag to publish"
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
default: "latest"
|
default: "latest"
|
||||||
|
package:
|
||||||
|
description: "Package to publish"
|
||||||
|
options:
|
||||||
|
- federation
|
||||||
|
type: choice
|
||||||
|
required: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
@ -40,10 +48,10 @@ jobs:
|
||||||
run: bun run build
|
run: bun run build
|
||||||
|
|
||||||
- name: Change version in package.json to ${{ github.event.inputs.version }}, defaulting to the truncated commit hash
|
- 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
|
- name: Publish to NPM
|
||||||
run: bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }}
|
run: bunx @morlay/bunpublish --provenance --tag ${{ github.event.inputs.tag }}
|
||||||
|
|
||||||
- name: Publish to JSR
|
- 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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue