chore: bump version to 0.4.1, update changelog #11
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: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build release binaries | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package binaries | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/melina dist/ | |
| cp target/${{ matrix.target }}/release/melina-cli dist/ | |
| tar -czf melina-${{ github.ref_name }}-${{ matrix.target }}.tar.gz -C dist melina melina-cli | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: melina-${{ matrix.target }} | |
| path: melina-${{ github.ref_name }}-${{ matrix.target }}.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: artifacts/**/*.tar.gz | |
| update-homebrew: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download tarballs and compute SHA256 | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| run: | | |
| BASE="https://github.com/vinhnxv/melina/releases/download/${TAG}" | |
| for target in aarch64-apple-darwin x86_64-apple-darwin x86_64-unknown-linux-gnu; do | |
| curl -sL "${BASE}/melina-${TAG}-${target}.tar.gz" -o "${target}.tar.gz" | |
| done | |
| echo "SHA_AARCH64_MAC=$(sha256sum aarch64-apple-darwin.tar.gz | cut -d' ' -f1)" >> "$GITHUB_ENV" | |
| echo "SHA_X86_64_MAC=$(sha256sum x86_64-apple-darwin.tar.gz | cut -d' ' -f1)" >> "$GITHUB_ENV" | |
| echo "SHA_X86_64_LINUX=$(sha256sum x86_64-unknown-linux-gnu.tar.gz | cut -d' ' -f1)" >> "$GITHUB_ENV" | |
| echo "VERSION=${TAG#v}" >> "$GITHUB_ENV" | |
| - name: Generate and push Homebrew formula | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| TAG: ${{ github.ref_name }} | |
| run: | | |
| cat > formula.rb <<FORMULA | |
| class Melina < Formula | |
| desc "Claude Code process monitor — track sessions, teammates, MCP servers, and orphans" | |
| homepage "https://github.com/vinhnxv/melina" | |
| version "${VERSION}" | |
| license "MIT" | |
| on_macos do | |
| on_arm do | |
| url "https://github.com/vinhnxv/melina/releases/download/${TAG}/melina-${TAG}-aarch64-apple-darwin.tar.gz" | |
| sha256 "${SHA_AARCH64_MAC}" | |
| end | |
| on_intel do | |
| url "https://github.com/vinhnxv/melina/releases/download/${TAG}/melina-${TAG}-x86_64-apple-darwin.tar.gz" | |
| sha256 "${SHA_X86_64_MAC}" | |
| end | |
| end | |
| on_linux do | |
| on_intel do | |
| url "https://github.com/vinhnxv/melina/releases/download/${TAG}/melina-${TAG}-x86_64-unknown-linux-gnu.tar.gz" | |
| sha256 "${SHA_X86_64_LINUX}" | |
| end | |
| end | |
| def install | |
| bin.install "melina" | |
| bin.install "melina-cli" | |
| end | |
| test do | |
| system bin/"melina-cli", "--help" | |
| end | |
| end | |
| FORMULA | |
| # Remove leading whitespace from heredoc | |
| sed -i 's/^ //' formula.rb | |
| FILE_SHA=$(gh api repos/vinhnxv/homebrew-tap/contents/Formula/melina.rb --jq '.sha') | |
| gh api repos/vinhnxv/homebrew-tap/contents/Formula/melina.rb \ | |
| -X PUT \ | |
| -f message="melina ${VERSION}" \ | |
| -f content="$(base64 -w0 < formula.rb)" \ | |
| -f sha="$FILE_SHA" |