name: Release
permissions:
contents: write
on:
push:
branches:
- main
tags:
- v[0-9]+.*
defaults:
run:
shell: bash --noprofile --norc -CeEuo pipefail {0}
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
RUSTFLAGS: -C target-feature=+crt-static
- target: x86_64-pc-windows-gnu
os: windows-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-linux-android
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install ubuntu libxcb1
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libxcb1 libxrandr2 libxcb1-dev -y
- name: run cross-build
uses: ahaoboy/cross-build@v1
with:
bin: neofetch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.target }}
RUSTFLAGS: ${{ matrix.RUSTFLAGS }}
tag: nightly
allowUpdates: true