-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.64 KB
/
publish.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
60
61
name: Publish package
on: workflow_dispatch
permissions:
contents: write
id-token: write
jobs:
publish_package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.34
- id: changelog
name: Generate changelog
run: bun scripts/generate-changelog.ts
- name: Install modules
run: bun install
- name: Run tests
run: bun test
- name: Build
run: bunx pkgroll
- name: Prepare to JSR publish
run: bun scripts/release-jsr.ts
- name: Type-check
run: tsc --noEmit
- name: Publish package to JSR
run: bunx jsr publish --allow-dirty
- name: Publish package to NPM
# if: ${{ github.event.inputs.publish_to_npm }}
run: bun publish --access public
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.changelog.outputs.version }}
name: v${{ steps.changelog.outputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
generateReleaseNotes: true