-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (86 loc) · 2.97 KB
/
Copy pathrelease-v2.yml
File metadata and controls
90 lines (86 loc) · 2.97 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
name: Release V2 Agent
on:
workflow_dispatch:
push:
tags: ['v2-agent-*']
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: linux-x64
runner: ubuntu-24.04
artifact: codex-meter-agent-linux-x64
- target: windows-x64
runner: windows-2025
artifact: codex-meter-agent-windows-x64.exe
# macos-14 is GitHub's standard Apple-silicon runner.
- target: macos-arm64
runner: macos-14
artifact: codex-meter-agent-macos-arm64
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.15.0
cache: npm
- run: npm ci
- name: Build and inject native SEA
shell: bash
env:
CODEX_METER_RELEASE_TARGET: ${{ matrix.target }}
CODEX_METER_RELEASE_OUT: dist/release-v2
run: npm run package:v2-agent
- name: Smoke test SEA without invoking node or npm
shell: bash
env:
ARTIFACT: dist/release-v2/${{ matrix.artifact }}
run: |
"$ARTIFACT" --version
tmp="$(mktemp -d)"
chmod 700 "$tmp"
config_tmp="$tmp"
if [ "$RUNNER_OS" = Windows ]; then config_tmp="$(cygpath -m "$tmp")"; fi
printf '%s\n' '{"serverUrl":"http://127.0.0.1:9","deviceId":"smoke","deviceSecret":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","codexHome":"'"$config_tmp"'/codex","databasePath":"'"$config_tmp"'/agent.db","allowHttpForTests":true}' > "$tmp/agent.json"
chmod 600 "$tmp/agent.json"
"$ARTIFACT" status --config "$tmp/agent.json"
- uses: actions/upload-artifact@v4
with:
name: agent-${{ matrix.target }}
path: dist/release-v2/${{ matrix.artifact }}
if-no-files-found: error
manifest:
needs: build
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 24.15.0 }
- uses: actions/download-artifact@v4
with:
pattern: agent-*
path: dist/release-v2
merge-multiple: true
- run: node scripts/release-v2-manifest.js dist/release-v2
- name: Verify checksums and manifest deterministically
run: |
sha256sum --check dist/release-v2/SHA256SUMS
cp dist/release-v2/manifest.json /tmp/manifest.json
node scripts/release-v2-manifest.js dist/release-v2
diff -u /tmp/manifest.json dist/release-v2/manifest.json
- uses: actions/upload-artifact@v4
with:
name: codex-meter-agent-v2-release
path: dist/release-v2/*
- name: Publish tagged release assets
if: startsWith(github.ref, 'refs/tags/v2-agent-')
uses: softprops/action-gh-release@v2
with:
files: dist/release-v2/*