feat(build): Add automatic JSR build

This commit is contained in:
Jesse Wierzbinski 2024-05-13 22:40:08 -10:00
parent f5fd4c0a04
commit 5c7eddc3b5
No known key found for this signature in database

View file

@ -15,6 +15,7 @@ on:
default: "latest" default: "latest"
permissions: permissions:
contents: read
# For provenance generation # For provenance generation
id-token: write id-token: write
@ -39,7 +40,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' run: 'sed -i ''s/"version": ".*"/"version": "${{ github.event.inputs.version }}"/'' package.json federation/package.json federation/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
run: cd federation && bunx jsr publish --provenance --allow-slow-types