Update README #245
This file contains hidden or 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: Zip Files | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [published] | |
| env: | |
| PIMORONI_AYE_ARR_VERSION: patch/examples | |
| jobs: | |
| build: | |
| name: Build ${{matrix.name}} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - name: TinyFX | |
| basename: tiny_fx | |
| shortname: tiny_fx | |
| board: PIMORONI_TINYFX | |
| - name: TinyFX W | |
| basename: tiny_fx | |
| shortname: tiny_fx_w | |
| board: PIMORONI_TINYFX | |
| - name: MightyFX W | |
| basename: mighty_fx | |
| shortname: mighty_fx | |
| board: PIMORONI_MIGHTYFX | |
| env: | |
| RELEASE_FILE: ${{matrix.shortname}}-${{github.event.release.tag_name || github.sha}} | |
| ROOT_DIR: "picofx" | |
| BOARD_DIR: "picofx/boards/${{matrix.board}}" | |
| LIBS_DIR: "picofx/lib_temp" | |
| EX_DIR: "picofx/ex_temp" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| path: picofx | |
| # Check out Pimoroni Aye Arr | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: pimoroni/aye_arr | |
| ref: ${{env.PIMORONI_AYE_ARR_VERSION}} | |
| submodules: false | |
| path: aye_arr | |
| - name: "Assemble lib content" | |
| shell: bash | |
| run: | | |
| mkdir -p ${{env.LIBS_DIR}}/lib | |
| cp -v -r ${{env.ROOT_DIR}}/picofx ${{env.LIBS_DIR}}/lib | |
| cp -v -r ${{env.BOARD_DIR}}/visible_libs/. ${{env.LIBS_DIR}}/lib | |
| cp -v -r ${{env.BOARD_DIR}}/../visible_libs/. ${{env.LIBS_DIR}}/lib | |
| cp -v -r ${{env.ROOT_DIR}}/../aye_arr/aye_arr ${{env.LIBS_DIR}}/lib | |
| find ${{env.LIBS_DIR}} -type f -name '*.md' -exec rm -v {} \; | |
| - name: "Assemble example content" | |
| shell: bash | |
| run: | | |
| mkdir -p ${{env.EX_DIR}} | |
| cp -v -r picofx/examples/${{matrix.basename}}/. ${{env.EX_DIR}} | |
| rm -v -f ${{env.EX_DIR}}/README.md | |
| rm -v -r -f ${{env.EX_DIR}}/examples/audio/photon_sword | |
| rm -v -f ${{env.EX_DIR}}/examples/audio/photon_sword.py | |
| - name: "Append W example content" | |
| if: matrix.shortname == 'tiny_fx_w' | |
| shell: bash | |
| run: | | |
| cp -v -r picofx/examples/tiny_fx_w/. ${{env.EX_DIR}} | |
| rm -v -f ${{env.EX_DIR}}/README.md | |
| - name: Libs .zip artifact | |
| if: matrix.shortname != 'tiny_fx_w' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.RELEASE_FILE}}-libraries-only | |
| path: picofx/lib_temp | |
| - name: Examples .zip artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{env.RELEASE_FILE}}-examples-only | |
| path: "picofx/ex_temp" | |
| - name: Libs .zip release asset | |
| if: github.event_name == 'release' && matrix.shortname != 'tiny_fx_w' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| with: | |
| asset_path: picofx/lib_temp | |
| upload_url: ${{github.event.release.upload_url}} | |
| asset_name: ${{env.RELEASE_FILE}}-libraries-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: "picofx/ex_temp" | |
| upload_url: ${{github.event.release.upload_url}} | |
| asset_name: ${{env.RELEASE_FILE}}-examples-only | |
| asset_content_type: application/octet-stream |