-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new publish workflow to upload assets to GH release (#99)
- Loading branch information
1 parent
f594c2c
commit 456fcdb
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Upload firmware to GitHub Release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: Version of the release | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
upload: | ||
name: Upload | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Download Artifact | ||
uses: actions/[email protected] | ||
with: | ||
path: files | ||
|
||
- name: Copy files to output | ||
run: |- | ||
mkdir output | ||
version="${{ inputs.version }}" | ||
pushd files | ||
for device in *; do | ||
pushd $device | ||
pushd $version | ||
cp manifest.json ../../../output/$device.manifest.json | ||
for bin in *.bin; do | ||
md5sum $bin | head -c 32 > ../../../output/$bin.md5 | ||
cp $bin ../../../output/ | ||
done | ||
popd | ||
popd | ||
done | ||
popd | ||
- name: Upload files to release | ||
uses: softprops/[email protected] | ||
with: | ||
files: output/* | ||
tag_name: ${{ inputs.version }} |