Fix release job#7
Conversation
73d7497 to
3fd659e
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR modifies the GitHub Actions release workflow to re-package downloaded artifacts before creating a GitHub release. The changes address a mismatch between the artifact structure downloaded from previous build jobs and the expected format for the release.
Key changes:
- Downgraded
actions/download-artifactfrom v6 to v4 - Added a new step to re-zip downloaded artifacts into the release-pack directory
- Updated the release creation command to use the newly created zip files from release-pack
- Removed the checkout step which was unnecessary for the release job
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for dir in ./artifacts/*; do | ||
| BOARD_NAME=$(basename "$dir") | ||
| zip -r ./release-pack/${BOARD_NAME}.zip "$dir" | ||
| done |
There was a problem hiding this comment.
The shell script lacks error handling. If ./artifacts is empty or contains non-directory files, the loop may fail silently or produce unexpected results. Consider adding a check to verify that ./artifacts/* expands to actual directories before processing, or use a glob pattern that only matches directories.
| for dir in ./artifacts/*; do | |
| BOARD_NAME=$(basename "$dir") | |
| zip -r ./release-pack/${BOARD_NAME}.zip "$dir" | |
| done | |
| shopt -s nullglob | |
| for dir in ./artifacts/*/; do | |
| if [ -d "$dir" ]; then | |
| BOARD_NAME=$(basename "$dir") | |
| zip -r ./release-pack/${BOARD_NAME}.zip "$dir" | |
| fi | |
| done | |
| shopt -u nullglob |
No description provided.