fabro/.github/workflows/release.yml
Bryan Helmkamp 076bebe218 Switch Linux CI jobs from ubuntu-latest to self-hosted
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-10 13:50:12 -04:00

76 lines
2.1 KiB
YAML

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
compile:
name: Compile (${{ matrix.target }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
runner: macos-15
- target: x86_64-unknown-linux-gnu
runner: self-hosted
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
with:
targets: ${{ matrix.target }}
- name: Build
run: cargo build --target ${{ matrix.target }} --release
- name: Test
run: cargo test --target ${{ matrix.target }} --release
- name: Package
run: |
mkdir arc-${{ matrix.target }}
cp target/${{ matrix.target }}/release/arc arc-${{ matrix.target }}/
tar czf arc-${{ matrix.target }}.tar.gz arc-${{ matrix.target }}
shasum -a 256 arc-${{ matrix.target }}.tar.gz > arc-${{ matrix.target }}.tar.gz.sha256
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: artifacts-arc-${{ matrix.target }}
path: |
arc-${{ matrix.target }}.tar.gz
arc-${{ matrix.target }}.tar.gz.sha256
release:
name: Release
needs: compile
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: target/distrib
pattern: artifacts-arc-*
merge-multiple: true
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.ref_name }}
run: gh release create "$TAG_NAME" target/distrib/* --generate-notes