Repository navigation
63 lines (49 loc) · 1.62 KB
/
Copy pathrelease.yml
File metadata and controls
63 lines (49 loc) · 1.62 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
58
59
60
61
62
63
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
# Canonical publish only — fork tag pushes lack NPM_TOKEN and must not fail noisily.
if: github.repository == 'tickernelz/opencode-mem'
# Prefer the new GA image; smoke/embedding still cover 24.04 + 26.04.
runs-on: ubuntu-26.04
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 lint
- run: bun run format:check
- 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