Skip to content

Commit d8b49fa

Browse files
authored
Merge pull request #12 from zombocoder/feature/windows-support
fix(release): update version retrieval and enhance asset upload for Windows compatibility
2 parents 422c669 + 6d68b84 commit d8b49fa

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ jobs:
230230
231231
- name: Get version
232232
id: get_version
233-
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
233+
shell: bash
234+
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
234235

235236
- name: Create release package (non-Windows)
236237
if: matrix.platform != 'windows'
@@ -464,28 +465,19 @@ jobs:
464465
hdiutil create -volname "BFC ${VERSION_NO_V}" -srcfolder dmg-contents -ov -format UDZO "${DMG_NAME}.dmg"
465466
466467
- name: Upload Release Assets
468+
shell: bash
467469
env:
468470
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
469471
VERSION: ${{ steps.get_version.outputs.version }}
470472
run: |
471473
echo "Current directory contents:"
472474
ls -la
473-
475+
474476
echo "Looking for package files..."
475-
find . -name "*.tar.gz" -o -name "*.deb" -o -name "*.rpm" -o -name "*.dmg" | head -20
476-
477-
# Upload all package files to the existing release
478-
for file in *.tar.gz *.deb *.rpm *.dmg; do
479-
if [ -f "$file" ]; then
480-
echo "Uploading $file to release ${VERSION}"
481-
gh release upload "${VERSION}" "$file" --clobber
482-
fi
477+
find . -maxdepth 1 \( -name "*.tar.gz" -o -name "*.deb" -o -name "*.rpm" -o -name "*.dmg" -o -name "*.zip" \)
478+
479+
shopt -s nullglob
480+
for file in *.tar.gz *.deb *.rpm *.dmg *.zip; do
481+
echo "Uploading $file to release ${VERSION}"
482+
gh release upload "${VERSION}" "$file" --clobber
483483
done
484-
485-
# Also try to upload from current directory using find results
486-
find . -maxdepth 1 \( -name "*.tar.gz" -o -name "*.deb" -o -name "*.rpm" -o -name "*.dmg" \) -exec bash -c '
487-
for file; do
488-
echo "Found and uploading: $file"
489-
gh release upload "${{ steps.get_version.outputs.version }}" "$file" --clobber
490-
done
491-
' _ {} +

0 commit comments

Comments
 (0)