-
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (49 loc) · 1.72 KB
/
Copy pathrelease.yml
File metadata and controls
58 lines (49 loc) · 1.72 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
name: codingbuddy-release
on:
release:
types: [published]
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install dependencies
run: yarn install --immutable
- 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 version number
working-directory: apps/mcp-server
run: |
name=$(jq -r .name package.json)
version=$(jq -r .version package.json)
echo "Published $name@$version"