-
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (48 loc) · 1.7 KB
/
build.yml
File metadata and controls
55 lines (48 loc) · 1.7 KB
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
47
48
49
50
51
52
53
54
55
on: [push, pull_request]
name: Build (and Release)
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (and Release)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: elf2uf2-rs@2.0.0
- name: Install Rust
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
rustup target add thumbv6m-none-eabi
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
- name: Build neotron-pico-bios
run: |
cargo build --release --verbose
mv ./target/thumbv6m-none-eabi/release/neotron-pico-bios ./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
elf2uf2-rs ./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: Artifacts
if-no-files-found: error
path: |
./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
./target/thumbv6m-none-eabi/release/neotron-pico-bios.uf2
- name: Upload files to Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
./target/thumbv6m-none-eabi/release/neotron-pico-bios.elf
./target/thumbv6m-none-eabi/release/neotron-pico-bios.uf2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}