-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.4 KB
/
build.yml
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: Build Project
on:
push:
branches: '*'
pull_request:
branches: '*'
release:
types: published
jobs:
build-projects:
runs-on: ubuntu-latest
name: Build & upload hex
steps:
- uses: actions/checkout@v4
- name: Build all projects
run: |
docker run --rm \
-v $(pwd):/home \
-e YOTTA_GITHUB_AUTHTOKEN='${{ secrets.YOTTA_GITHUB_AUTHTOKEN }}' \
ghcr.io/carlosperate/microbit-toolchain:v2.0.0 \
yotta build
- name: Upload hex file
uses: actions/upload-artifact@v4
with:
name: error-programme
path: build/bbc-microbit-classic-gcc/src/error-programme-combined.hex
if-no-files-found: error
release-asset:
name: Upload artifact as GH Release asset
needs: build-projects
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Set the GH Release tag to env variable $TAG
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Download all hex file
uses: actions/download-artifact@v4
id: download-hex-files
- name: Upload hex file to GH Release
uses: microbit-foundation/[email protected]
with:
file: ${{steps.download-hex-files.outputs.download-path}}/error-programme/error-programme-combined.hex
asset_name: error-programme-${{ env.TAG }}.hex