Skip to content

Commit

Permalink
Added release.yml for cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
iesahin committed Dec 28, 2024
1 parent 2168ea3 commit 488c05c
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
workflow_dispatch:
# schedule:
# - cron: "17 17 * * *"
pull_request:
# types: [labeled, review_requested]
push:
tags:
- "v*.*.*"

jobs:
release:
name: Release - ${{ matrix.platform.os-name }}
strategy:
matrix:
platform:
- os-name: FreeBSD-x86_64
runs-on: ubuntu-20.04
target: x86_64-unknown-freebsd
skip_tests: true

- os-name: Linux-x86_64
runs-on: ubuntu-20.04
target: x86_64-unknown-linux-musl

- os-name: Linux-aarch64
runs-on: ubuntu-20.04
target: aarch64-unknown-linux-musl

- os-name: Linux-riscv64
runs-on: ubuntu-20.04
target: riscv64gc-unknown-linux-gnu

- os-name: Windows-x86_64
runs-on: windows-latest
target: x86_64-pc-windows-msvc

- os-name: macOS-x86_64
runs-on: macOS-latest
target: x86_64-apple-darwin

# more targets here ...

runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Publish artifacts and release
uses: houseabsolute/actions-rust-release@v0
with:
executable-name: ubi
target: ${{ matrix.platform.target }}

0 comments on commit 488c05c

Please sign in to comment.