-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.18 KB
/
release.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
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
push:
tags: v*
permissions:
contents: write
id-token: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set-up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: Build npm package
run: deno task build:npm
- name: Generate release notes
uses: actions/github-script@v7
with:
script: |
const tag = context.ref.split('/').at(-1);
github.rest.repos.createRelease({
name: `Release ${tag}`,
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tag,
generate_release_notes: true
})
- name: Publish to JSR
run: npx jsr publish
- name: Publish to npm
run: cd npm && npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}