-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.84 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (58 loc) · 1.84 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
name: Release .mcpb
on:
push:
branches: [main]
permissions:
contents: write
jobs:
# Run the full lint/format/typecheck/build suite; the release is gated on it.
quality:
uses: ./.github/workflows/quality.yml
check:
needs: quality
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
should_release: ${{ steps.check.outputs.should_release }}
steps:
- uses: actions/checkout@v7
- name: Read version from package.json
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
- name: Check whether this version is already released
id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "v${{ steps.version.outputs.version }} already released — skipping."
echo "should_release=false" >> "$GITHUB_OUTPUT"
else
echo "should_release=true" >> "$GITHUB_OUTPUT"
fi
release:
needs: check
if: needs.check.outputs.should_release == 'true'
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.check.outputs.version }}
steps:
- uses: actions/checkout@v7
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: .node-version
- name: Enable Corepack (Yarn)
run: corepack enable
- name: Install dependencies
run: yarn install
- name: Build the .mcpb bundle
run: yarn bundle
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "v${VERSION}" \
"companycam-mcp-server-${VERSION}.mcpb" \
--title "v${VERSION}" \
--generate-notes