-
Notifications
You must be signed in to change notification settings - Fork 138
56 lines (44 loc) · 1.34 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (44 loc) · 1.34 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
- name: Install source dependencies
run: bun install --frozen-lockfile
- name: Install web dependencies
working-directory: web
run: bun install --frozen-lockfile
- run: bun run typecheck
- run: bun run build
- name: Verify tag matches package version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
TAG_VERSION="${GITHUB_REF_NAME#v}"
if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
echo "Tag version v$TAG_VERSION does not match package.json version $PACKAGE_VERSION"
exit 1
fi
- name: Setup Node.js for npm publish
uses: actions/setup-node@v7
with:
node-version: '24'
package-manager-cache: false
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true