Skip to content

Commit

Permalink
feat: gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpdev committed Sep 8, 2024
1 parent 7bf1300 commit c70efab
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rspi-bios"
authors = ["Piotr Placzek <[email protected]>"]
version = "0.1.0"
version = "1.0.0"
edition = "2021"
repository = "https://github.com/piotrpdev/rspi-bios"
license = "GPL-3.0"
Expand Down

0 comments on commit c70efab

Please sign in to comment.