57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
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: 24
|
|
registry-url: https://registry.npmjs.org
|
|
package-manager-cache: false
|
|
|
|
- run: npm run build
|
|
- run: npm publish --provenance --access public
|
|
|
|
- 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 }}
|