-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.06 KB
/
release.yml
File metadata and controls
39 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release Automation (triggered on tag)
on:
push:
tags: v[0-9]+.[0-9]+.[0-9]+
jobs:
test-deno:
runs-on: ubuntu-latest
name: Test the Deno CLI
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: v2.x
- name: Run the CLI to verify it's working
run: deno task run
publish-jsr:
name: Publish to JSR
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
runs-on: ubuntu-latest
needs: test-deno
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: v2.x
- name: Update version in `deno.json`
run: |
tag=${GITHUB_REF#refs/tags/}
version=${tag#v}
jq --arg version "$version" '.version = $version' deno.json > tmp.$$.json
mv tmp.$$.json deno.json
- name: Publish to JSR
run: deno publish --allow-dirty