-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.2 KB
/
release.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Release
on:
release:
types:
- published
push:
tags:
- "v*.*.*"
permissions:
contents: read
jobs:
draft:
name: Create draft release
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup git-cliff
uses: kenji-miyake/setup-git-cliff@v1
- uses: actions/github-script@v6
id: changelog
with:
result-encoding: string
script: |
const { stdout } = await exec.getExecOutput('git', ['cliff', '-l', '--strip', 'header'])
return stdout
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
draft: true
body: ${{ steps.changelog.outputs.result }}
publish:
name: Publish to JSR
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Publish (dry-run)
run: deno publish --dry-run
- name: Publish
run: deno publish