chore(release): v0.1.15
#16
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 Binaries | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.label }} | |
| runs-on: ${{ matrix.runner }} | |
| continue-on-error: ${{ matrix.experimental }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: linux-x86_64-gnu | |
| runner: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| experimental: false | |
| # musl is intentionally omitted: tray-icon's `gtk` feature | |
| # transitively pulls glib/GTK, which are glibc-only — there | |
| # is no realistic static-link path against musl. | |
| - label: linux-aarch64-gnu | |
| runner: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| experimental: true | |
| - label: macos-x86_64 | |
| runner: macos-15-intel | |
| target: x86_64-apple-darwin | |
| experimental: false | |
| - label: macos-aarch64 | |
| runner: macos-15 | |
| target: aarch64-apple-darwin | |
| experimental: false | |
| - label: windows-x86_64 | |
| runner: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| experimental: false | |
| - label: windows-aarch64 | |
| runner: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| experimental: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.94.0 | |
| with: | |
| targets: ${{ matrix.target }} | |
| # GPUI + tray-icon (gtk) link GTK / xkbcommon / xcb / fontconfig | |
| # via pkg-config on Linux. Skipped on aarch64 because installing | |
| # both :amd64 and :arm64 of -dev packages conflicts on shared | |
| # multi-arch files (e.g. /usr/share/gir-1.0/Pango-1.0.gir) — the | |
| # aarch64 cross step installs only the arm64 variants it needs. | |
| - name: Install Linux build dependencies | |
| if: startsWith(matrix.runner, 'ubuntu') && matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential pkg-config \ | |
| libgtk-3-dev libxkbcommon-x11-dev \ | |
| libxcb1-dev libxcb-render0-dev \ | |
| libxcb-shape0-dev libxcb-xfixes0-dev \ | |
| libfontconfig-dev | |
| - name: Install aarch64 cross-compile toolchain | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| set -euxo pipefail | |
| # Restrict primary mirrors to amd64 so apt-get update does | |
| # not 404 fetching arm64 metadata from an amd64-only mirror. | |
| if [ -f /etc/apt/sources.list ]; then | |
| sudo sed -i 's|^deb http|deb [arch=amd64,i386] http|g' /etc/apt/sources.list | |
| fi | |
| if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then | |
| sudo sed -i '/^Types:.*deb/a Architectures: amd64 i386' /etc/apt/sources.list.d/ubuntu.sources | |
| fi | |
| # arm64 packages live on ports.ubuntu.com, not the primary mirror. | |
| codename=$(lsb_release -cs) | |
| sudo tee /etc/apt/sources.list.d/arm64.list >/dev/null <<EOF | |
| deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${codename} main universe restricted multiverse | |
| deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${codename}-updates main universe restricted multiverse | |
| deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports ${codename}-security main universe restricted multiverse | |
| EOF | |
| sudo dpkg --add-architecture arm64 | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| pkg-config \ | |
| gcc-aarch64-linux-gnu \ | |
| g++-aarch64-linux-gnu \ | |
| libgtk-3-dev:arm64 \ | |
| libxkbcommon-x11-dev:arm64 \ | |
| libxcb1-dev:arm64 \ | |
| libxcb-render0-dev:arm64 \ | |
| libxcb-shape0-dev:arm64 \ | |
| libxcb-xfixes0-dev:arm64 \ | |
| libfontconfig-dev:arm64 | |
| mkdir -p .cargo | |
| cat >> .cargo/config.toml <<'EOF' | |
| [target.aarch64-unknown-linux-gnu] | |
| linker = "aarch64-linux-gnu-gcc" | |
| EOF | |
| # Point pkg-config at the arm64 sysroot for this target only. | |
| # Ubuntu noble doesn't ship a per-arch pkg-config wrapper, so | |
| # we reuse the native binary and steer it with PKG_CONFIG_PATH | |
| # + SYSROOT, gated to the cross target via the suffix form. | |
| { | |
| echo "PKG_CONFIG_PATH_aarch64-unknown-linux-gnu=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig" | |
| echo "PKG_CONFIG_PATH_aarch64_unknown_linux_gnu=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig" | |
| echo "PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu=/" | |
| echo "PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu=/" | |
| echo "PKG_CONFIG_ALLOW_CROSS_aarch64-unknown-linux-gnu=1" | |
| echo "PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu=1" | |
| # Belt-and-braces: the Rust pkg-config crate primarily | |
| # checks the unsuffixed flag. Safe here since this step | |
| # only runs on the aarch64 matrix job. | |
| echo "PKG_CONFIG_ALLOW_CROSS=1" | |
| } >> "$GITHUB_ENV" | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build release binaries | |
| run: cargo build --workspace --release --locked --target "${{ matrix.target }}" | |
| # rsvg-convert lets the .app build script produce a real | |
| # .icns; without it we ship the SVG fallback. | |
| - name: Install macOS bundling tools | |
| if: startsWith(matrix.runner, 'macos') | |
| run: brew install librsvg | |
| - name: Package release artifacts (Unix) | |
| if: ${{ !startsWith(matrix.runner, 'windows') }} | |
| shell: bash | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| TARGET_TRIPLE: ${{ matrix.target }} | |
| IS_LINUX: ${{ startsWith(matrix.runner, 'ubuntu') }} | |
| IS_MACOS: ${{ startsWith(matrix.runner, 'macos') }} | |
| CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} | |
| run: | | |
| set -euo pipefail | |
| ASSET_DIR="aura-${TAG}-${TARGET_TRIPLE}" | |
| mkdir -p "dist/${ASSET_DIR}" | |
| cp "target/${TARGET_TRIPLE}/release/aura" "dist/${ASSET_DIR}/aura" | |
| cp "target/${TARGET_TRIPLE}/release/aura-plugin-rtk" "dist/${ASSET_DIR}/aura-plugin-rtk" | |
| chmod 755 "dist/${ASSET_DIR}/aura" "dist/${ASSET_DIR}/aura-plugin-rtk" | |
| # Linux: ship the .desktop launcher + brand SVG so the | |
| # release-mode install.sh can wire up a clickable launcher | |
| # without any extra downloads. The systemd unit ships too | |
| # for users who explicitly opt into autostart. | |
| if [ "$IS_LINUX" = "true" ]; then | |
| for f in aura.desktop aura.svg aura.service; do | |
| if [ -f "packaging/$f" ]; then | |
| cp "packaging/$f" "dist/${ASSET_DIR}/$f" | |
| chmod 644 "dist/${ASSET_DIR}/$f" | |
| fi | |
| done | |
| fi | |
| # macOS archives carry Aura.app. The launchd plist ships | |
| # alongside for users who explicitly opt into autostart. | |
| if [ "$IS_MACOS" = "true" ]; then | |
| ./scripts/build-macos-app.sh \ | |
| "target/${TARGET_TRIPLE}/release/aura" \ | |
| "dist/${ASSET_DIR}" | |
| cp packaging/com.aura.agent-usage.plist \ | |
| "dist/${ASSET_DIR}/com.aura.agent-usage.plist" | |
| chmod 644 "dist/${ASSET_DIR}/com.aura.agent-usage.plist" | |
| fi | |
| # README and LICENSE for context inside the archive. | |
| for f in README.md LICENSE; do | |
| [ -f "$f" ] && cp "$f" "dist/${ASSET_DIR}/$f" | |
| done | |
| tar -C dist -czf "dist/${ASSET_DIR}.tar.gz" "${ASSET_DIR}" | |
| ( | |
| cd dist | |
| if command -v sha256sum >/dev/null 2>&1; then | |
| sha256sum "${ASSET_DIR}.tar.gz" > "${ASSET_DIR}.sha256" | |
| else | |
| shasum -a 256 "${ASSET_DIR}.tar.gz" > "${ASSET_DIR}.sha256" | |
| fi | |
| ) | |
| - name: Package release artifacts (Windows) | |
| if: startsWith(matrix.runner, 'windows') | |
| shell: pwsh | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| TARGET_TRIPLE: ${{ matrix.target }} | |
| run: | | |
| $ErrorActionPreference = 'Stop' | |
| $assetDir = "aura-$env:TAG-$env:TARGET_TRIPLE" | |
| $stageRoot = "dist/$assetDir" | |
| New-Item -ItemType Directory -Force -Path $stageRoot | Out-Null | |
| Copy-Item "target/$env:TARGET_TRIPLE/release/aura.exe" "$stageRoot/aura.exe" | |
| Copy-Item "target/$env:TARGET_TRIPLE/release/aura-plugin-rtk.exe" "$stageRoot/aura-plugin-rtk.exe" | |
| if (Test-Path "scripts/install.ps1") { | |
| Copy-Item "scripts/install.ps1" "$stageRoot/install.ps1" | |
| } | |
| # Brand icon for the Start Menu / Startup shortcuts created | |
| # by install.ps1. Without it the .lnk files fall back to the | |
| # generic executable icon. | |
| if (Test-Path "packaging/windows/aura.ico") { | |
| Copy-Item "packaging/windows/aura.ico" "$stageRoot/aura.ico" | |
| } | |
| foreach ($f in @('README.md', 'LICENSE')) { | |
| if (Test-Path $f) { Copy-Item $f "$stageRoot/$f" } | |
| } | |
| $zip = "dist/$assetDir.zip" | |
| if (Test-Path $zip) { Remove-Item $zip } | |
| Compress-Archive -Path "$stageRoot/*" -DestinationPath $zip | |
| $hash = (Get-FileHash -Algorithm SHA256 $zip).Hash.ToLower() | |
| "$hash $assetDir.zip" | Out-File -Encoding ascii "dist/$assetDir.sha256" | |
| - name: Upload packaged artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-${{ matrix.target }} | |
| path: | | |
| dist/*.tar.gz | |
| dist/*.zip | |
| dist/*.sha256 | |
| if-no-files-found: error | |
| publish: | |
| name: Publish GitHub release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download packaged artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| dist/*.tar.gz | |
| dist/*.zip | |
| dist/*.sha256 |