Skip to content

Prepare public release #1

Prepare public release

Prepare public release #1

Workflow file for this run

name: release
# Build cross-platform binaries and attach them to a GitHub Release.
# Trigger by pushing a version tag (e.g. `git tag v0.1.0 && git push origin v0.1.0`),
# or run manually from the Actions tab with a tag input.
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Existing tag to build and release (e.g. v0.1.0)"
required: true
permissions:
contents: write
jobs:
release:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
os: macos-13
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
- name: Build and upload release binary
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: browser-control
target: ${{ matrix.target }}
# Produces e.g. browser-control-aarch64-apple-darwin.tar.gz
archive: browser-control-$target
tar: unix
# cross-compile linux/aarch64 in a container when the host can't build it natively
checksum: sha256
ref: refs/tags/${{ inputs.tag || github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}