Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 39 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
- name: (2) Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.4.3
version: 5.15.2
host: windows
target: desktop
arch: win64_msvc2019_64
Expand Down Expand Up @@ -428,7 +428,7 @@
Copy-Item -Path "src\build\Release\OpenConverter.exe" -Destination "OpenConverter_win64"

# 3) Bundle Qt runtime into OpenConverter_win64/
& "D:\a\_temp\Qt\6.4.3\msvc2019_64\bin\windeployqt.exe" `
& "D:\a\_temp\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe" `
"--qmldir=src" `
"OpenConverter_win64\OpenConverter.exe"

Expand All @@ -451,73 +451,100 @@
- name: Finish
run: echo "Windows x64 build complete"

# Upload all artifacts to GitHub Release (only runs on tag push or release creation)
# Upload all available artifacts to GitHub Release (only runs on tag push or release creation)
# Uses !cancelled() so the release is created even if some build jobs fail
upload-release:
if: startsWith(github.ref, 'refs/tags/')
if: |
startsWith(github.ref, 'refs/tags/') &&
!cancelled()
needs: [build-linux, build-linglong, build-macos-arm, build-windows-x64]
runs-on: ubuntu-latest

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
continue-on-error: true

- name: List downloaded artifacts
run: |
echo "Downloaded artifacts:"
ls -la artifacts/
find artifacts -type f
ls -la artifacts/ 2>/dev/null || echo "No artifacts directory"
find artifacts -type f 2>/dev/null || true

- name: Prepare release packages
id: prepare
run: |
cd artifacts

# Linux x86_64 - already a tar.gz
if [ -f "OpenConverter_Linux_x86_64/OpenConverter_Linux_x86_64.tar.gz" ]; then
cp OpenConverter_Linux_x86_64/OpenConverter_Linux_x86_64.tar.gz ../OpenConverter_Linux_x86_64.tar.gz
fi

# Linux aarch64 - already a tar.gz
if [ -f "OpenConverter_Linux_aarch64/OpenConverter_Linux_aarch64.tar.gz" ]; then
cp OpenConverter_Linux_aarch64/OpenConverter_Linux_aarch64.tar.gz ../OpenConverter_Linux_aarch64.tar.gz
fi

# Linglong x86_64 - layer file
if [ -d "OpenConverter_Linglong_x86_64" ]; then
cp OpenConverter_Linglong_x86_64/*.layer ../ || true
fi

# Linglong aarch64 - layer file
if [ -d "OpenConverter_Linglong_aarch64" ]; then
cp OpenConverter_Linglong_aarch64/*.layer ../ || true
fi

# macOS aarch64 - already a dmg
if [ -f "OpenConverter_macOS_aarch64/OpenConverter_macOS_aarch64.dmg" ]; then
cp OpenConverter_macOS_aarch64/OpenConverter_macOS_aarch64.dmg ../OpenConverter_macOS_aarch64.dmg
fi

# Windows x64 - create zip from folder
if [ -d "OpenConverter_win64" ]; then
cd OpenConverter_win64
zip -r ../../OpenConverter_win64.zip .
cd ..
fi

cd ..
echo "Release packages:"
ls -la *.tar.gz *.dmg *.zip *.layer 2>/dev/null || echo "Some packages may be missing"

# Build dynamic file list for upload (only files that actually exist)
FILES=""
for f in OpenConverter_Linux_x86_64.tar.gz OpenConverter_Linux_aarch64.tar.gz \
OpenConverter_macOS_aarch64.dmg OpenConverter_win64.zip; do
if [ -f "$f" ]; then
FILES="${FILES}${f}"$'\n'
fi
done
shopt -s nullglob
for f in *.layer; do
FILES="${FILES}${f}"$'\n'
done
shopt -u nullglob

if [ -z "$FILES" ]; then
echo "No release packages found. All builds may have failed."
echo "HAS_FILES=false" >> $GITHUB_OUTPUT
else
echo "Files to upload:"
echo "$FILES"
echo "FILES<<EOF" >> $GITHUB_OUTPUT
echo -n "$FILES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "HAS_FILES=true" >> $GITHUB_OUTPUT
fi

- name: Upload Release Assets
if: steps.prepare.outputs.HAS_FILES == 'true'
uses: softprops/action-gh-release@v1
with:
files: |
OpenConverter_Linux_x86_64.tar.gz
OpenConverter_Linux_aarch64.tar.gz
*.layer
OpenConverter_macOS_aarch64.dmg
OpenConverter_win64.zip
files: ${{ steps.prepare.outputs.FILES }}

- name: Finish
run: echo "Release upload complete"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Loading