opencode gpt-5-codex and glm-4.6 #139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish and Benchmark Preview Packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "!**" | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sha: ${{ steps.publish.outputs.sha }} | |
| urls: ${{ steps.publish.outputs.urls }} | |
| packages: ${{ steps.publish.outputs.packages }} | |
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: 1.2.21 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build | |
| run: bun run build | |
| - id: publish | |
| name: Publish preview with pkg.pr.new | |
| run: bunx pkg-pr-new publish --bun | |
| - id: matrix | |
| name: Build benchmark matrix | |
| run: | | |
| bun add -g opencode-ai@dev @openai/codex-sdk | |
| set -euo pipefail | |
| MATRIX_JSON="$(bun run scripts/generate-benchmark-matrix.ts)" | |
| printf 'matrix=%s\n' "${MATRIX_JSON}" >> "$GITHUB_OUTPUT" | |
| run-benchmarks: | |
| needs: publish | |
| if: needs.publish.result == 'success' && needs.publish.outputs.urls != '' | |
| uses: ./.github/workflows/benchmark-reusable.yml | |
| with: | |
| matrix: ${{ needs.publish.outputs.matrix }} | |
| package_urls: ${{ needs.publish.outputs.urls }} | |
| secrets: inherit |