-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.13 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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