fix: normalize ATO tool schemas and prepare v1.2.3 release #7
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: bun-linux-x64 | |
| artifact: cc-linux-x64 | |
| - os: macos-latest | |
| target: bun-darwin-arm64 | |
| artifact: cc-darwin-arm64 | |
| - os: windows-latest | |
| target: bun-windows-x64 | |
| artifact: cc-windows-x64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Inject version into src/version.ts | |
| shell: bash | |
| run: | | |
| VER="${GITHUB_REF_NAME#v}" | |
| node - <<'NODE' | |
| const fs = require('node:fs') | |
| const path = 'src/version.ts' | |
| const ver = process.env.VER | |
| const text = fs.readFileSync(path, 'utf8') | |
| const next = text.replace(/export const VERSION = '[^']+'/u, `export const VERSION = '${ver}'`) | |
| if (text === next) throw new Error('VERSION anchor not found in src/version.ts') | |
| fs.writeFileSync(path, next, 'utf8') | |
| NODE | |
| - name: Stub react-devtools-core (not available in standalone binary) | |
| shell: bash | |
| run: | | |
| mkdir -p node_modules/react-devtools-core | |
| echo 'module.exports = {}' > node_modules/react-devtools-core/index.js | |
| echo '{"name":"react-devtools-core","version":"0.0.0","main":"index.js"}' > node_modules/react-devtools-core/package.json | |
| - name: Build standalone binary | |
| run: bun build src/app.tsx --compile --target=${{ matrix.target }} --outfile ${{ matrix.artifact }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: Publish GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| cc-linux-x64 | |
| cc-darwin-arm64 | |
| cc-windows-x64.exe |