chore: bump version to 0.13.0 #59
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*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to release (e.g., v0.1.0)' | |
| required: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| validate: | |
| name: Validate Version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Validate version matches tag | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| TAG="${{ github.event.inputs.tag }}" | |
| else | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| fi | |
| TAG_VERSION="${TAG#v}" | |
| CARGO_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/') | |
| echo "Tag version: $TAG_VERSION" | |
| echo "Cargo.toml version: $CARGO_VERSION" | |
| if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then | |
| echo "::error::Version mismatch! Cargo.toml has $CARGO_VERSION but tag is $TAG" | |
| echo "Use the 'Prepare Release' workflow to bump the version automatically." | |
| echo "Or manually update Cargo.toml and Cargo.lock to version $TAG_VERSION before tagging." | |
| exit 1 | |
| fi | |
| echo "✓ Versions match" | |
| build: | |
| name: Build ${{ matrix.target }} | |
| needs: validate | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| name: aoe-darwin-amd64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: aoe-darwin-arm64 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: aoe-linux-amd64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: aoe-linux-arm64 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools (Linux ARM64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| run: | | |
| if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then | |
| export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc | |
| fi | |
| cargo build --release --target ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/aoe dist/${{ matrix.name }} | |
| cd dist | |
| tar -czvf ${{ matrix.name }}.tar.gz ${{ matrix.name }} | |
| shasum -a 256 ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: | | |
| dist/${{ matrix.name }}.tar.gz | |
| dist/${{ matrix.name }}.tar.gz.sha256 | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: | | |
| echo "=== Artifacts directory ===" | |
| ls -laR artifacts/ | |
| echo "=== Finding tar.gz files ===" | |
| find artifacts -type f -name '*.tar.gz*' | head -20 | |
| - name: Get version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: Agent of Empires ${{ steps.version.outputs.version }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| artifacts/*.tar.gz | |
| artifacts/*.tar.gz.sha256 | |
| generate_release_notes: true | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| update-homebrew: | |
| name: Update Homebrew Formula | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Calculate SHA256 hashes | |
| id: hashes | |
| run: | | |
| cd artifacts | |
| echo "darwin_arm64=$(sha256sum aoe-darwin-arm64.tar.gz | cut -d' ' -f1)" >> $GITHUB_OUTPUT | |
| echo "darwin_amd64=$(sha256sum aoe-darwin-amd64.tar.gz | cut -d' ' -f1)" >> $GITHUB_OUTPUT | |
| echo "linux_arm64=$(sha256sum aoe-linux-arm64.tar.gz | cut -d' ' -f1)" >> $GITHUB_OUTPUT | |
| echo "linux_amd64=$(sha256sum aoe-linux-amd64.tar.gz | cut -d' ' -f1)" >> $GITHUB_OUTPUT | |
| - name: Update Homebrew formula | |
| env: | |
| HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| VERSION: ${{ needs.release.outputs.version }} | |
| run: | | |
| VERSION_NUM="${VERSION#v}" | |
| git clone https://x-access-token:${HOMEBREW_TAP_TOKEN}@github.com/njbrake/homebrew-aoe.git | |
| cd homebrew-aoe | |
| cat > Formula/aoe.rb << 'FORMULA' | |
| class Aoe < Formula | |
| desc "Terminal session manager for AI coding agents" | |
| homepage "https://github.com/njbrake/agent-of-empires" | |
| version "VERSION_PLACEHOLDER" | |
| license "MIT" | |
| on_macos do | |
| on_arm do | |
| url "https://github.com/njbrake/agent-of-empires/releases/download/vVERSION_PLACEHOLDER/aoe-darwin-arm64.tar.gz" | |
| sha256 "DARWIN_ARM64_SHA" | |
| end | |
| on_intel do | |
| url "https://github.com/njbrake/agent-of-empires/releases/download/vVERSION_PLACEHOLDER/aoe-darwin-amd64.tar.gz" | |
| sha256 "DARWIN_AMD64_SHA" | |
| end | |
| end | |
| on_linux do | |
| on_arm do | |
| url "https://github.com/njbrake/agent-of-empires/releases/download/vVERSION_PLACEHOLDER/aoe-linux-arm64.tar.gz" | |
| sha256 "LINUX_ARM64_SHA" | |
| end | |
| on_intel do | |
| url "https://github.com/njbrake/agent-of-empires/releases/download/vVERSION_PLACEHOLDER/aoe-linux-amd64.tar.gz" | |
| sha256 "LINUX_AMD64_SHA" | |
| end | |
| end | |
| depends_on "tmux" | |
| livecheck do | |
| url :stable | |
| strategy :github_latest | |
| end | |
| def install | |
| if OS.mac? | |
| if Hardware::CPU.arm? | |
| bin.install "aoe-darwin-arm64" => "aoe" | |
| else | |
| bin.install "aoe-darwin-amd64" => "aoe" | |
| end | |
| else | |
| if Hardware::CPU.arm? | |
| bin.install "aoe-linux-arm64" => "aoe" | |
| else | |
| bin.install "aoe-linux-amd64" => "aoe" | |
| end | |
| end | |
| end | |
| test do | |
| assert_match "session manager", shell_output("#{bin}/aoe --help") | |
| end | |
| end | |
| FORMULA | |
| sed -i "s/VERSION_PLACEHOLDER/${VERSION_NUM}/g" Formula/aoe.rb | |
| sed -i "s/DARWIN_ARM64_SHA/${{ steps.hashes.outputs.darwin_arm64 }}/g" Formula/aoe.rb | |
| sed -i "s/DARWIN_AMD64_SHA/${{ steps.hashes.outputs.darwin_amd64 }}/g" Formula/aoe.rb | |
| sed -i "s/LINUX_ARM64_SHA/${{ steps.hashes.outputs.linux_arm64 }}/g" Formula/aoe.rb | |
| sed -i "s/LINUX_AMD64_SHA/${{ steps.hashes.outputs.linux_amd64 }}/g" Formula/aoe.rb | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/aoe.rb | |
| git commit -m "Update aoe to ${VERSION}" | |
| git push | |