forked from tobi/qmd
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.41 KB
/
publish.yml
File metadata and controls
57 lines (45 loc) · 1.41 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish
on:
push:
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install SQLite
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Verify lockfile is up-to-date
run: bun install --frozen-lockfile
- run: bun test --timeout 60000 --preload ./src/test-preload.ts test/
env:
CI: true
LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- run: npm run build
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Extract release notes
id: notes
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(./scripts/extract-changelog.sh "$VERSION")
# Write to file for gh release (avoids quoting issues)
echo "$NOTES" > /tmp/release-notes.md
- name: Create GitHub release
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes-file /tmp/release-notes.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}