-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (82 loc) · 2.7 KB
/
filesystem.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Zip Files
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
- name: TinyFX W
shortname: tiny_fx_w
board: PIMORONI_TINYFX
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
- 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
rm -v ${{env.LIBS_DIR}}/lib/picofx/README.md
- name: "Assemble example content"
shell: bash
run: |
mkdir -p ${{env.EX_DIR}}
cp -v -r picofx/examples/tiny_fx/. ${{env.EX_DIR}}
rm -v ${{env.EX_DIR}}/README.md
rm -v -r ${{env.EX_DIR}}/examples/audio/photon_sword
rm -v ${{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 ${{env.EX_DIR}}/README.md
- name: Libs .zip artifact
if: matrix.shortname == 'tiny_fx'
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'
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