Skip to content

Commit 4c2c9f0

Browse files
committed
CI: Build filesystem .uf2 with dir2uf2.
1 parent 8b94ea8 commit 4c2c9f0

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/release-zip.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,24 @@ jobs:
1212
runs-on: ubuntu-20.04
1313

1414
env:
15-
RELEASE_FILE: enviro
15+
RELEASE_FILE: enviro-${{github.event.release.tag_name || github.sha}}
1616

1717
steps:
1818
- uses: actions/checkout@v2
1919
with:
2020
path: enviro
2121
submodules: true
2222

23+
- uses: actions/checkout@v2
24+
with:
25+
repository: gadgetoid/dir2uf2
26+
path: dir2uf2
27+
2328
- name: Prepare repository
2429
shell: bash
2530
run: |
31+
python3 -m pip install littlefs-python
32+
./dir2uf2/dir2uf2 --manifest dir2uf2/enviro.txt --filename ${{env.RELEASE_FILE}}-filesystem-only.uf2 enviro/
2633
rm -rf enviro/.git*
2734
rm -rf enviro/phew/.git*
2835
@@ -37,6 +44,12 @@ jobs:
3744
name: ${{env.RELEASE_FILE}}
3845
path: enviro/
3946

47+
- name: Store .zip as artifact
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: ${{env.RELEASE_FILE}}-filesystem-only
51+
path: ${{env.RELEASE_FILE}}-filesystem-only.uf2
52+
4053
- name: Upload .zip
4154
if: github.event_name == 'release'
4255
uses: actions/upload-release-asset@v1
@@ -46,4 +59,15 @@ jobs:
4659
asset_path: ${{env.RELEASE_FILE}}.zip
4760
upload_url: ${{github.event.release.upload_url}}
4861
asset_name: ${{env.RELEASE_FILE}}.zip
62+
asset_content_type: application/octet-stream
63+
64+
- name: Upload .uf2
65+
if: github.event_name == 'release'
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
69+
with:
70+
asset_path: ${{env.RELEASE_FILE}}-filesystem-only.uf2
71+
upload_url: ${{github.event.release.upload_url}}
72+
asset_name: ${{env.RELEASE_FILE}}-filesystem-only.uf2
4973
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)