Skip to content

Commit ece7985

Browse files
committed
debug
1 parent 67a8469 commit ece7985

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

.github/workflows/build.yaml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ jobs:
144144
uses: actions/upload-artifact@v4
145145
with:
146146
name: "${{ env.APP_NAME }}-artifacts-linux${{ matrix.demo && '-demo' || '' }}"
147-
path: |
148-
*.AppImage
149-
*.zip
147+
path: ${{ matrix.demo && '*.AppImage' || '*.zip' }}
150148
if-no-files-found: error
151149

152150
build-mac:
@@ -185,7 +183,39 @@ jobs:
185183
- name: Deploy
186184
run: |
187185
macdeployqt "build/${{ env.APP_NAME }}.app" -dmg -verbose=2
188-
mv "build/${{ env.APP_NAME }}.dmg" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo' || '' }}.dmg"
186+
187+
- name: Remove xattr attributes from dmg
188+
run: |
189+
set -e
190+
dmgfile="build/${{ env.APP_NAME }}.dmg"
191+
# 1. Mount the .dmg if it exists
192+
if [ -f "$dmgfile" ]; then
193+
echo "Mounting '${dmgfile}'..."
194+
hdiutil attach "${dmgfile}"
195+
else
196+
echo "'${dmgfile}' file does not exist."
197+
exit 1
198+
fi
199+
200+
# 2. Copy the app to /tmp
201+
echo "Copying the application from the mounted volume..."
202+
cp -R "/Volumes/build:${{ env.APP_NAME }}.app/${{ env.APP_NAME }}.app" "/tmp/${{ env.APP_NAME }}.app"
203+
204+
# 3. Remove extended attributes (quarantine, etc.)
205+
echo "Removing extended attributes..."
206+
xattr -rc "/tmp/${{ env.APP_NAME }}.app"
207+
208+
# 4. Create a new clean
209+
echo "Creating the clean .dmg..."
210+
mv "/tmp/${{ env.APP_NAME }}.app" "/tmp/${{ env.APP_LABEL }}.app"
211+
hdiutil create -volname "${{ env.APP_LABEL }}" \
212+
-srcfolder"/tmp/${{ env.APP_LABEL }}.app" \
213+
-format UDZO \
214+
-ov "${{ env.APP_LABEL }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo' || '' }}.dmg"
215+
216+
# 5. Detach the mounted volume
217+
echo "Detaching the volume..."
218+
hdiutil detach "/Volumes/build:${{ env.APP_NAME }}"
189219
190220
- name: Zip builds
191221
if: matrix.demo == false
@@ -196,9 +226,7 @@ jobs:
196226
uses: actions/upload-artifact@v4
197227
with:
198228
name: "${{ env.APP_NAME }}-artifacts-mac${{ matrix.demo && '-demo' || '' }}"
199-
path: |
200-
*.dmg
201-
*.zip
229+
path: ${{ matrix.demo && '*.dmg' || '*.zip' }}
202230
if-no-files-found: error
203231

204232
build-windows:
@@ -272,7 +300,9 @@ jobs:
272300
- name: Create NSIS installer
273301
run: |
274302
makensis /DAPP_NAME="${{ env.APP_NAME }}" /DPACKAGE_VERSION="${{ env.PACKAGE_VERSION }}" win-installer\installer.nsi
275-
REN "win-installer\${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo' || '' }}.exe"
303+
304+
- run: |
305+
MOVE "win-installer\${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo == 'true' && '-demo' || '' }}.exe"
276306
277307
- name: Zip builds
278308
if: matrix.demo == false
@@ -283,9 +313,7 @@ jobs:
283313
uses: actions/upload-artifact@v4
284314
with:
285315
name: "${{ env.APP_NAME }}-artifacts-win${{ matrix.demo && '-demo' || '' }}"
286-
path: |
287-
*.exe
288-
*.zip
316+
path: ${{ matrix.demo && '*.exe' || '*.zip' }}
289317
if-no-files-found: error
290318

291319
release:

0 commit comments

Comments
 (0)