feat: os version, cpu arch #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'publish' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.rs' | |
workflow_dispatch: | |
concurrency: production | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Restore Apt packages | |
uses: awalsh128/[email protected] | |
with: | |
packages: libclang1 gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu | |
version: "1.0" | |
- name: Install Rust toolchain | |
uses: dtolnay/[email protected] | |
with: | |
targets: "armv7-unknown-linux-gnueabihf,aarch64-unknown-linux-gnu" | |
- name: Restore Rust cache | |
uses: Swatinem/[email protected] | |
- name: Static build (ARM64) | |
run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --locked --release --target=aarch64-unknown-linux-gnu | |
- name: Static build (ARMv7) | |
run: RUSTFLAGS='-C target-feature=+crt-static' cargo build --locked --release --target=armv7-unknown-linux-gnueabihf | |
- name: Rename binaries | |
run: | | |
cp target/aarch64-unknown-linux-gnu/release/rspi-bios ./rspi-bios-aarch64-unknown-linux-gnu | |
cp target/armv7-unknown-linux-gnueabihf/release/rspi-bios ./rspi-bios-armv7-unknown-linux-gnueabihf | |
- name: Tag | |
id: tag | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INITIAL_VERSION: "1.0.0" | |
- name: Release | |
uses: softprops/[email protected] | |
with: | |
tag_name: ${{ steps.tag.outputs.new_tag }} | |
fail_on_unmatched_files: true | |
files: | | |
rspi-bios-aarch64-unknown-linux-gnu | |
rspi-bios-armv7-unknown-linux-gnueabihf |