-
-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (89 loc) · 3.35 KB
/
release.yml
File metadata and controls
104 lines (89 loc) · 3.35 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: codingbuddy-release
on:
release:
types: [published]
permissions:
contents: read
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
publish:
if: github.repository == 'JeremyDev87/codingbuddy'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '24'
- name: Restore dependencies from cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: |
node_modules
apps/*/node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Verify version consistency
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
chmod +x scripts/verify-release-versions.sh
./scripts/verify-release-versions.sh "$TAG_NAME"
env:
GITHUB_REF: ${{ github.ref }}
- name: Build mcp-server
run: yarn workspace codingbuddy build
- name: Publish rules
working-directory: packages/rules
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
TAG_NAME="${TAG_NAME#v}"
echo "Publishing codingbuddy-rules version: $TAG_NAME"
cat <<< "$( jq --arg v "$TAG_NAME" '.version = $v' package.json )" > package.json
yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_REF: ${{ github.ref }}
- name: Publish mcp-server
working-directory: apps/mcp-server
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
TAG_NAME="${TAG_NAME#v}"
echo "Publishing codingbuddy version: $TAG_NAME"
# Update version and replace workspace dependency with actual version
cat <<< "$( jq --arg v "$TAG_NAME" '.version = $v | .dependencies["codingbuddy-rules"] = $v' package.json )" > package.json
yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_REF: ${{ github.ref }}
- name: Output mcp-server version
working-directory: apps/mcp-server
run: |
name=$(jq -r .name package.json)
version=$(jq -r .version package.json)
echo "Published $name@$version"
- name: Build plugin
run: yarn workspace codingbuddy-claude-plugin build
- name: Publish plugin
working-directory: packages/claude-code-plugin
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
TAG_NAME="${TAG_NAME#v}"
echo "Publishing codingbuddy-claude-plugin version: $TAG_NAME"
cat <<< "$( jq --arg v "$TAG_NAME" '.version = $v' package.json )" > package.json
yarn npm publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_REF: ${{ github.ref }}
- name: Output plugin version
working-directory: packages/claude-code-plugin
run: |
name=$(jq -r .name package.json)
version=$(jq -r .version package.json)
echo "Published $name@$version"