feat: gh action #24
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 | |
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 | |
version: "1.0" | |
- name: Install Rust toolchain | |
uses: dtolnay/[email protected] | |
with: | |
targets: armv7-unknown-linux-gnueabihf | |
- name: Restore Rust cache | |
uses: Swatinem/[email protected] | |
- name: Build | |
run: cargo build --release --target=armv7-unknown-linux-gnueabihf | |
- name: Rename binary | |
run: cp target/armv7-unknown-linux-gnueabihf/release/rspi-bios ./rspi-bios-armv7-unknown-linux-gnu | |
- 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 }} | |
files: "rspi-bios-armv7-unknown-linux-gnu" | |
fail_on_unmatched_files: true |