Skip to content

Commit abc866e

Browse files
authored
Add regz and uf2 releases to the github deploy action (ZigEmbeddedGroup#339)
* ci: add regz/uf2 release artifact generation to deploy * ci: remove verbose tar output for boxzer artifact * ci: removed separate artifact upload step * fix(ci): find -exec mv resulting in error that is code stopping ci * fix(ci): incorrect uf2 artifact source path * ci: renamed boxzer-out to microzig-packaged * Revert "ci: renamed boxzer-out to microzig-packaged" This reverts commit cfb0f6f.
1 parent 752386c commit abc866e

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,28 @@ jobs:
3131
- name: Assemble Packages
3232
run: zig build package -- https://microzig.tech/downloads/microzig
3333

34+
- name: Release RegZ
35+
run: |
36+
zig build release-regz
37+
find zig-out/* -type d -print0 | xargs -0 -I {} sh -c 'mv {} "$(dirname {})"/regz-"$(basename {})"'
38+
39+
- name: Release Uf2
40+
run: |
41+
zig build release-uf2
42+
find zig-out/* -type d -and -not -path "*regz*" -print0 | xargs -0 -I {} sh -c 'mv {} "$(dirname {})"/uf2-"$(basename {})"'
43+
44+
- name: Create Microzig Tarball
45+
run: |
46+
tar -czf boxzer-out.tar.gz -C boxzer-out .
47+
48+
- name: Create regz Tarballs
49+
run: |
50+
find zig-out/regz* -type d -exec sh -c 'tar -czf "{}.tar.gz" -C {} .' \;
51+
52+
- name: Create uf2 Tarballs
53+
run: |
54+
find zig-out/uf2* -type d -exec sh -c 'tar -czf "{}.tar.gz" -C {} .' \;
55+
3456
- name: Create Release Draft
3557
uses: ncipollo/release-action@v1
3658
id: create_release
@@ -39,17 +61,4 @@ jobs:
3961
artifactErrorsFailBuild: true
4062
draft: true
4163
generateReleaseNotes: true
42-
43-
- name: Create Tarball
44-
run: |
45-
tar -czvf boxzer-out.tar.gz -C boxzer-out .
46-
47-
- name: Upload Artifact to Release
48-
uses: actions/upload-release-asset@v1
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
with:
52-
upload_url: ${{ steps.create_release.outputs.upload_url }}
53-
asset_path: boxzer-out.tar.gz
54-
asset_name: boxzer-out.tar.gz
55-
asset_content_type: application/gzip
64+
artifacts: boxzer-out.tar.gz,zig-out/regz*.tar.gz,zig-out/uf2*.tar.gz

0 commit comments

Comments
 (0)