Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronRP committed Sep 26, 2024
1 parent 4e3e2f6 commit d6c391d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 26 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Rust CI and release

on:
push:
branches:
- '**'
tags:
- '*'
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Add target for cross-compilation
run: rustup target add thumbv6m-none-eabi

- name: Install flip-link
run: cargo install flip-link

- name: Build the project
run: cargo build --release --target=thumbv6m-none-eabi

- name: Generate SHA256 checksum
run: sha256sum ./target/thumbv6m-none-eabi/release/tc2-firmware | cut -d ' ' -f 1 > ./target/thumbv6m-none-eabi/release/tc2-firmware.sha256

- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: |
./target/thumbv6m-none-eabi/release/tc2-firmware
./target/thumbv6m-none-eabi/release/tc2-firmware.sha256
allowUpdates: true
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

0 comments on commit d6c391d

Please sign in to comment.