Skip to content

Commit c7ce90c

Browse files
ci: improve release workflow with error handling and shell configuration
1 parent ce66002 commit c7ce90c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/create-release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,23 @@ jobs:
7474
- name: Update Release
7575
env:
7676
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
shell: bash
7778
run: |
79+
set -euo pipefail
80+
7881
# Check if release exists
7982
if gh release view "${{ env.VERSION }}" &>/dev/null; then
80-
# Update existing release
83+
echo "Updating existing release ${{ env.VERSION }}"
8184
gh release edit "${{ env.VERSION }}" \
8285
--title "Release ${{ env.VERSION }}" \
8386
--notes-file release_notes.md
8487
else
85-
# Create new release
88+
echo "Creating new release ${{ env.VERSION }}"
8689
gh release create "${{ env.VERSION }}" \
8790
--title "Release ${{ env.VERSION }}" \
8891
--notes-file release_notes.md \
89-
--target ${GITHUB_REF#refs/heads/}
92+
--target "${GITHUB_REF#refs/heads/}"
93+
fi
9094
9195
- name: Download ISO Artifacts
9296
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)