mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
feat(build): ✨ Add automatic JSR build
This commit is contained in:
parent
f5fd4c0a04
commit
5c7eddc3b5
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
|
@ -15,6 +15,7 @@ on:
|
|||
default: "latest"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# For provenance generation
|
||||
id-token: write
|
||||
|
||||
|
|
@ -39,7 +40,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'
|
||||
run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json federation/package.json federation/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 --provenance --allow-slow-types
|
||||
|
|
|
|||
Loading…
Reference in a new issue