Skip to content

Commit c02bdc1

Browse files
committed
chore(ci): Publish to JSR on tag
1 parent 6e301bf commit c02bdc1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/deno_tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,25 @@ jobs:
9595
deno-version: v2.x
9696
- run: deno publish --dry-run
9797

98+
publish:
99+
runs-on: ubuntu-latest
100+
needs: [test, publish-dry-run]
101+
if: github.ref_type == 'tag'
102+
permissions:
103+
contents: read
104+
id-token: write
105+
attestations: write
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Check tag matches ${{ github.ref_name }}
109+
run: jq -e ".version==\"${TAG#v}\"" deno.json
110+
env:
111+
TAG: ${{ github.ref_name }}
112+
- uses: denoland/setup-deno@v2
113+
with:
114+
deno-version: v2.x
115+
- run: deno publish
116+
98117
deploy:
99118
needs: [build]
100119
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)