-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 987 Bytes
/
publish.yaml
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
40
41
name: publish
on:
release:
types: [published]
jobs:
release:
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
strategy:
matrix:
os: [ubuntu-latest]
deno: [v1.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Get tag version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
- name: Modify jsr config
uses: maxgfr/github-change-json@main
with:
key: version
value: ${{steps.get_tag_version.outputs.TAG_VERSION}}
path: ./jsr.json
- name: publish
# --allow-dirty is required because the uncommit file exists because the jsr config was changed in the previous job.
run: deno task publish --allow-dirty