feat: add install.sh and launch content (X post + blog) #1
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 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Gate: full smoke test before any release artifacts | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.88" | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo check --workspace | |
| - run: cargo clippy --workspace -- -D warnings | |
| - run: cargo fmt --all -- --check | |
| - run: cargo test --workspace | |
| # Build release binaries for all platforms | |
| build: | |
| name: Build (${{ matrix.target }}) | |
| needs: test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| artifact: symphony-linux-amd64 | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| artifact: symphony-macos-amd64 | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact: symphony-macos-arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.88" | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --target ${{ matrix.target }} | |
| - run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/symphony dist/${{ matrix.artifact }} | |
| chmod +x dist/${{ matrix.artifact }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: dist/${{ matrix.artifact }} | |
| # Create GitHub Release with binary artifacts | |
| release: | |
| name: GitHub Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" | |
| # Collect all binary artifacts | |
| mkdir -p release | |
| for dir in artifacts/*/; do | |
| cp "$dir"* release/ 2>/dev/null || true | |
| done | |
| # Create GitHub release with binaries | |
| gh release create "$TAG" \ | |
| --title "Symphony $TAG" \ | |
| --generate-notes \ | |
| release/* | |
| # Publish to crates.io (all workspace crates in dependency order) | |
| publish: | |
| name: Publish to crates.io | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.88" | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Publish crates in dependency order | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| set -e | |
| # Publish order: leaves first, root binary last | |
| # Each --no-verify avoids rebuilding (already tested above) | |
| CRATES=( | |
| symphony-core | |
| symphony-config | |
| symphony-tracker | |
| symphony-workspace | |
| symphony-agent | |
| symphony-orchestrator | |
| symphony-observability | |
| ) | |
| for crate in "${CRATES[@]}"; do | |
| echo "Publishing $crate..." | |
| cargo publish -p "$crate" --no-verify || { | |
| echo "Skipping $crate (may already be published)" | |
| } | |
| # Wait for crates.io index to update | |
| sleep 30 | |
| done | |
| # Publish the root binary crate last | |
| echo "Publishing symphony-cli (binary)..." | |
| cargo publish -p symphony-cli --no-verify || { | |
| echo "Skipping symphony-cli (may already be published)" | |
| } | |
| # Build and push Docker image | |
| docker: | |
| name: Docker Push | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version | |
| id: meta | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.version }} | |
| ghcr.io/${{ github.repository }}:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |