CI: Add zip builds for Examples and Libs. #1
Workflow file for this run
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
name: MicroPython Firmware | |
on: | |
push: | |
pull_request: | |
release: | |
types: [created] | |
jobs: | |
build: | |
name: Build ${{matrix.name}} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- name: TinyFX | |
shortname: tiny_fx | |
board: PIMORONI_TINYFX | |
env: | |
RELEASE_FILE: ${{matrix.shortname}}-${{github.event.release.tag_name || github.sha}} | |
FIRMWARE_DIR: "$GITHUB_WORKSPACE/picofx/boards" | |
ROOT_DIR: "$GITHUB_WORKSPACE/picofx" | |
BOARD_DIR: "$GITHUB_WORKSPACE/picofx/boards/${{matrix.board}}" | |
EXAMPLES_DIR: "$GITHUB_WORKSPACE/picofx/examples/${{matrix.shortname}}" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
path: picofx | |
- name: Libs .zip artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{env.RELEASE_FILE}}-libs-only | |
path: ${{env.ROOT_DIR}}/picofx | |
- name: Examples .zip artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{env.RELEASE_FILE}}-examples-only | |
path: ${{env.EXAMPLES_DIR}} | |
- name: Libs .zip release asset | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
asset_path: ${{env.ROOT_DIR}}/picofx | |
upload_url: ${{github.event.release.upload_url}} | |
asset_name: ${{env.RELEASE_FILE}}-libs-only | |
asset_content_type: application/octet-stream | |
- name: Examples .zip release asset | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
asset_path: ${{env.EXAMPLES_DIR}} | |
upload_url: ${{github.event.release.upload_url}} | |
asset_name: ${{env.RELEASE_FILE}}-examples-only | |
asset_content_type: application/octet-stream |