Skip to content

Commit

Permalink
workflows: fix artifact handling
Browse files Browse the repository at this point in the history
- Correct how uploaded artifacts are named during the build
- Fix artifact-download property that had underscore instead of dash
- Update release workflow to use tag without "template_" prefix

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys committed Nov 5, 2024
1 parent 6b63ed1 commit c696223
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build_zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ jobs:
run: |
cd build
mkdir -p artifacts
BOARD_NICENAME=${{ inputs.BOARD }}
BOARD_NICENAME=${BOARD_NICENAME//\//_}
mv merged.hex ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${BOARD_NICENAME}_full.hex
mv app/zephyr/zephyr.signed.bin ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${BOARD_NICENAME}_update.bin
mv app/zephyr/zephyr.elf ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${BOARD_NICENAME}.elf
mv merged.hex ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}_full.hex
mv app/zephyr/zephyr.signed.bin ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}_update.bin
mv app/zephyr/zephyr.elf ./artifacts/ac_power_monitor_${{ inputs.TAG }}_${{ steps.nicename.outputs.BOARD_NICENAME }}.elf
# Run IDs are unique per repo but are reused on re-runs
- name: Save artifact
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
version:
description: 'Release Version.'
required: true
default: 'template_v0.0.0'
default: 'v0.0.0'
type: string

jobs:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
with:
pattern: build_artifacts_*
path: ~/artifacts
merge_multiple: true
merge-multiple: true

- name: Create Release manually with GH CLI
run: gh release create --title ${{ inputs.version }} --draft ${{ inputs.version }}
Expand Down

0 comments on commit c696223

Please sign in to comment.