Remove macos-x64 from Homebrew formula #9
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*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: macos-latest | |
| binary: ccli-macos-arm64 | |
| - runner: ubuntu-latest | |
| binary: ccli-linux-x64 | |
| - runner: ubuntu-24.04-arm | |
| binary: ccli-linux-arm64 | |
| - runner: windows-latest | |
| binary: ccli-win-x64.exe | |
| runs-on: ${{ matrix.runner }} | |
| name: Build ${{ matrix.binary }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - name: Build SEA binary | |
| run: node scripts/sea-build.js ${{ matrix.binary }} | |
| - name: Smoke test | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.binary }}" == *.exe ]]; then | |
| ./dist/${{ matrix.binary }} --version | |
| else | |
| chmod +x ./dist/${{ matrix.binary }} | |
| ./dist/${{ matrix.binary }} --version | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.binary }} | |
| path: dist/${{ matrix.binary }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| name: Create Release | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: ls -lR artifacts | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| prerelease: false | |
| files: artifacts/* | |
| update-homebrew: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| name: Update Homebrew Tap | |
| steps: | |
| - name: Get version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Download release binaries | |
| run: | | |
| base="https://github.com/seabearDEV/codexCLI/releases/download/${GITHUB_REF_NAME}" | |
| for bin in ccli-macos-arm64 ccli-linux-x64 ccli-linux-arm64; do | |
| curl -fsSL "$base/$bin" -o "$bin" | |
| done | |
| - name: Compute SHA256 checksums | |
| id: sha | |
| run: | | |
| echo "macos_arm64=$(sha256sum ccli-macos-arm64 | awk '{print $1}')" >> "$GITHUB_OUTPUT" | |
| echo "linux_x64=$(sha256sum ccli-linux-x64 | awk '{print $1}')" >> "$GITHUB_OUTPUT" | |
| echo "linux_arm64=$(sha256sum ccli-linux-arm64 | awk '{print $1}')" >> "$GITHUB_OUTPUT" | |
| - name: Checkout tap repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: seabearDEV/homebrew-ccli | |
| token: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| path: homebrew-ccli | |
| - name: Generate formula | |
| env: | |
| CCLI_VERSION: ${{ steps.version.outputs.version }} | |
| SHA_MACOS_ARM64: ${{ steps.sha.outputs.macos_arm64 }} | |
| SHA_LINUX_X64: ${{ steps.sha.outputs.linux_x64 }} | |
| SHA_LINUX_ARM64: ${{ steps.sha.outputs.linux_arm64 }} | |
| run: | | |
| mkdir -p homebrew-ccli/Formula | |
| cat > homebrew-ccli/Formula/ccli.rb << EOF | |
| class Ccli < Formula | |
| desc "Command-line information store for quick reference of frequently used data" | |
| homepage "https://github.com/seabearDEV/codexCLI" | |
| version "$CCLI_VERSION" | |
| license "MIT" | |
| livecheck do | |
| url :stable | |
| strategy :github_latest | |
| end | |
| on_macos do | |
| url "https://github.com/seabearDEV/codexCLI/releases/download/v$CCLI_VERSION/ccli-macos-arm64" | |
| sha256 "$SHA_MACOS_ARM64" | |
| end | |
| on_linux do | |
| if Hardware::CPU.arm? | |
| url "https://github.com/seabearDEV/codexCLI/releases/download/v$CCLI_VERSION/ccli-linux-arm64" | |
| sha256 "$SHA_LINUX_ARM64" | |
| else | |
| url "https://github.com/seabearDEV/codexCLI/releases/download/v$CCLI_VERSION/ccli-linux-x64" | |
| sha256 "$SHA_LINUX_X64" | |
| end | |
| end | |
| def install | |
| binary = Dir.glob("ccli-*").first | |
| bin.install binary => "ccli" | |
| end | |
| test do | |
| assert_match version.to_s, shell_output("#{bin}/ccli --version") | |
| end | |
| end | |
| EOF | |
| - name: Push updated formula | |
| working-directory: homebrew-ccli | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/ccli.rb | |
| git commit -m "Update ccli to $CCLI_VERSION" | |
| git push | |
| env: | |
| CCLI_VERSION: ${{ steps.version.outputs.version }} |