-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd2fa66
commit f86cacd
Showing
3 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 -v $(pwd):/home --rm 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters