-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.73 KB
/
release.yml
File metadata and controls
62 lines (49 loc) · 1.73 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: npm
- name: Verify tag matches package and plugin versions
env:
TAG_NAME: ${{ github.ref_name }}
run: |
node --input-type=module <<'EOF'
import { readFileSync } from 'node:fs';
const expected = process.env.TAG_NAME.replace(/^v/, '');
const packageVersion = JSON.parse(readFileSync('package.json', 'utf8')).version;
const pluginVersion = JSON.parse(readFileSync('claude/.codex-plugin/plugin.json', 'utf8')).version;
if (packageVersion !== expected) {
throw new Error(`package.json version ${packageVersion} does not match tag ${expected}`);
}
if (pluginVersion !== expected) {
throw new Error(`plugin.json version ${pluginVersion} does not match tag ${expected}`);
}
EOF
- name: Install dependencies
run: npm ci
- name: Install Codex CLI
run: |
npm install --global @openai/codex
codex --version
- name: Run Claude plugin test suite
run: npm run test:claude
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
run: gh release create "$TAG_NAME" --generate-notes --title "$TAG_NAME"