Skip to content

fix: release workflow — use cross for ARM64 Linux, install OpenSSL #2

fix: release workflow — use cross for ARM64 Linux, install OpenSSL

fix: release workflow — use cross for ARM64 Linux, install OpenSSL #2

Workflow file for this run

name: Release CLI Binary
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
artifact: warp-linux-x64
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
artifact: warp-linux-arm64
use_cross: true
- target: x86_64-apple-darwin
os: macos-latest
artifact: warp-darwin-x64
- target: aarch64-apple-darwin
os: macos-latest
artifact: warp-darwin-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install OpenSSL (Linux x64)
if: matrix.os == 'ubuntu-latest' && !matrix.use_cross
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- name: Install cross (Linux ARM64)
if: matrix.use_cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build (native)
if: "!matrix.use_cross"
run: cargo build --release --package warp-cli --target ${{ matrix.target }}
- name: Build (cross)
if: matrix.use_cross
run: cross build --release --package warp-cli --target ${{ matrix.target }}
- name: Rename binary
run: cp target/${{ matrix.target }}/release/warp ${{ matrix.artifact }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
warp-linux-x64/warp-linux-x64
warp-linux-arm64/warp-linux-arm64
warp-darwin-x64/warp-darwin-x64
warp-darwin-arm64/warp-darwin-arm64