Publish JSR #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish JSR | |
on: | |
workflow_run: | |
workflows: ['Release'] | |
types: | |
- completed | |
branches: | |
- main | |
paths: | |
- 'pkgs/**/jsr.json' # Specifically watch for jsr.json changes | |
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: Publish Packages | |
run: | | |
for pkg in pkgs/*/; do | |
if [ -f "${pkg}jsr.json" ]; then | |
cd "$pkg" | |
deno publish | |
cd ../../ | |
fi | |
done |