Skip to content

Commit

Permalink
CI: Add zip builds for Examples and Libs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jul 29, 2024
1 parent a18ca3e commit ad12dc8
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/filesystem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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

0 comments on commit ad12dc8

Please sign in to comment.