1- on :
2- push :
3- tags :
4- - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5-
1+ on : [push, pull_request]
62name : Upload Release
73
84jobs :
95 build :
10- name : Upload Release
6+ name : Build and release
117 runs-on : ubuntu-latest
128 steps :
139 - name : Checkout
1410 uses : actions/checkout@v1
1511 with :
1612 submodules : true
17- - name : Add Target
18- run : rustup target add thumbv6m-none-eabi
13+
14+ - name : Add targets
15+ run : |
16+ rustup target add thumbv6m-none-eabi
17+ rustup target add thumbv7em-none-eabihf
18+
1919 - name : Install flip-link
2020 run : cd / && cargo install flip-link
21- - name : Build
22- run : cargo build --release --target=thumbv6m-none-eabi
21+
22+ - name : Build neotron-bmc-pico
23+ run : cd neotron-bmc-pico && cargo build --release --verbose --target=thumbv6m-none-eabi
24+
25+ - name : Build neotron-bmc-nucleo
26+ run : cd neotron-bmc-nucleo && cargo build --release --verbose --target=thumbv7em-none-eabihf
27+
2328 - name : Get Branch Name
29+ if : github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
2430 id : branch_name
2531 run : |
2632 echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
33+
2734 - name : Create Release
35+ if : github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
2836 id : create_release
2937 uses : actions/create-release@v1
3038 env :
@@ -34,10 +42,13 @@ jobs:
3442 release_name : Release ${{ steps.branch_name.outputs.SOURCE_TAG }}
3543 draft : false
3644 prerelease : false
45+
3746 - name : Upload files to Release
47+ if : github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
3848 uses : softprops/action-gh-release@v1
3949 with :
4050 files : |
41- target/thumbv6m-none-eabi/release/neotron-bmc
51+ neotron-bmc-pico/target/thumbv6m-none-eabi/release/neotron-bmc
52+ neotron-bmc-nucleo/target/thumbv7em-none-eabihf/release/neotron-bmc
4253 env :
4354 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments