Skip to content

Publish JSR

Publish JSR #8

Workflow file for this run

name: Publish JSR
on:
workflow_run:
workflows: ['Release']
types:
- completed
branches:
- main
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: 1.x
- name: Sync Versions and Publish Packages
run: |
# Run the sync script if needed
chmod +x scripts/sync-versions
./scripts/sync-versions
# Publish each package with a jsr.json
for pkg in pkgs/*/; do
if [ -f "${pkg}jsr.json" ]; then
cd "$pkg"
deno publish
cd ../../
fi
done