Skip to content

Commit c0b7b0c

Browse files
committed
JSR release only for ESM-only branch
1 parent 4c1e6b0 commit c0b7b0c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/jsr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,15 @@ jobs:
1212
steps:
1313
- name: Checkout the repository
1414
uses: actions/checkout@v4
15+
- name: Check tag version
16+
id: check
17+
run: |
18+
TAG=${GITHUB_REF#refs/tags/}
19+
MAJOR=$(echo $TAG | cut -d. -f1)
20+
if [[ "$MAJOR" =~ ^[0-9]+$ && "$MAJOR" -gt 3 ]]; then
21+
echo "version_ok=true" >> $GITHUB_OUTPUT
22+
fi
23+
shell: bash
1524
- name: Publish to JSR
25+
if: steps.check.outputs.version_ok == 'true'
1626
run: npx jsr publish

0 commit comments

Comments
 (0)