@@ -373,70 +373,70 @@ jobs:
373373 APP_BASE_NAME="${APP_NAME%.app}"
374374 echo "APP_BASE_NAME=$APP_BASE_NAME" >> $GITHUB_ENV
375375
376- # - name: Sign, create, and staple the universal2 DMG
377- # env:
378- # APPLE_ID: ${{ secrets.APPLE_ID }}
379- # APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
380- # CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }}
381- # CERTIFICATE_BASE64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }}
382- # KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
383- # APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APPLICATION_SPECIFIC_PASSWORD }}
384- # run: |
385- # # Copy the application to location expected by the packaging scripts.
386- # mkdir -p package/pyinstaller/dist
387- # cp -a dist/universal2/$APP_NAME package/pyinstaller/dist/PyMca.app
388- # cd package/pyinstaller
389- # # Remove unnecessary packages.
390- # rm -fr dist/PyMca.app/Contents/Frameworks/pkg_resources/tests
391- # mkdir -p artifacts
392- # ./codesign.sh
393- # ./create-dmg.sh
394- # ./notarize.sh
395- # VERSION=${APP_NAME#PyMca}; VERSION=${VERSION%.app}
396- # mv artifacts/PyMca.dmg ../../dist/PyMca${VERSION}.dmg
397- # cd ../..
398- # rm -fr package/pyinstaller/dist
399- # rm -fr package/pyinstaller/artifacts
400- #
401- # - name: Mount the DMG
402- # run: |
403- # set -e
404- # DMG_NAME="${{ env.APP_BASE_NAME }}.dmg"
405- # MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
406- #
407- # echo "Mounting DMG $DMG_NAME at $MOUNT_POINT"
408- # hdiutil attach "dist/$DMG_NAME" -mountpoint "$MOUNT_POINT"
409- #
410- # - name: Copy .app to /Applications
411- # run: |
412- # set -e
413- # APP_PATH="/Volumes/${{ env.APP_BASE_NAME }}/${{ env.APP_NAME }}"
414- # sudo cp -R "$APP_PATH" /Applications/
415- #
416- # - name: Make main binary executable
417- # run: chmod +x /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain
418- #
419- # - name: Run the x86_64 tests
420- # run: |
421- # set -e
422- # arch -x86_64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
423- #
424- # - name: Run the arm64 tests
425- # run: |
426- # set -e
427- # arch -arm64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
428- #
429- # - name: Unmount the DMG
430- # if: always()
431- # run: |
432- # set -e
433- # MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
434- # echo "Unmounting DMG at $MOUNT_POINT"
435- # hdiutil detach "$MOUNT_POINT"
436- #
437- # - name: Upload the universal2 DMG artifact
438- # uses: actions/upload-artifact@v4
439- # with:
440- # name: macos-universal2-dmg
441- # path: dist/*.dmg
442- # retention-days: 1
376+ - name : Sign, create, and staple the universal2 DMG
377+ env :
378+ APPLE_ID : ${{ secrets.APPLE_ID }}
379+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
380+ CERTIFICATE_PASSWORD : ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }}
381+ CERTIFICATE_BASE64 : ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }}
382+ KEYCHAIN_PASSWORD : ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
383+ APPLICATION_SPECIFIC_PASSWORD : ${{ secrets.APPLE_APPLICATION_SPECIFIC_PASSWORD }}
384+ run : |
385+ # Copy the application to location expected by the packaging scripts.
386+ mkdir -p package/pyinstaller/dist
387+ cp -a dist/universal2/$APP_NAME package/pyinstaller/dist/PyMca.app
388+ cd package/pyinstaller
389+ # Remove unnecessary packages.
390+ rm -fr dist/PyMca.app/Contents/Frameworks/pkg_resources/tests
391+ mkdir -p artifacts
392+ ./codesign.sh
393+ ./create-dmg.sh
394+ ./notarize.sh
395+ VERSION=${APP_NAME#PyMca}; VERSION=${VERSION%.app}
396+ mv artifacts/PyMca.dmg ../../dist/PyMca${VERSION}.dmg
397+ cd ../..
398+ rm -fr package/pyinstaller/dist
399+ rm -fr package/pyinstaller/artifacts
400+
401+ - name : Mount the DMG
402+ run : |
403+ set -e
404+ DMG_NAME="${{ env.APP_BASE_NAME }}.dmg"
405+ MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
406+
407+ echo "Mounting DMG $DMG_NAME at $MOUNT_POINT"
408+ hdiutil attach "dist/$DMG_NAME" -mountpoint "$MOUNT_POINT"
409+
410+ - name : Copy .app to /Applications
411+ run : |
412+ set -e
413+ APP_PATH="/Volumes/${{ env.APP_BASE_NAME }}/${{ env.APP_NAME }}"
414+ sudo cp -R "$APP_PATH" /Applications/
415+
416+ - name : Make main binary executable
417+ run : chmod +x /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain
418+
419+ - name : Run the x86_64 tests
420+ run : |
421+ set -e
422+ arch -x86_64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
423+
424+ - name : Run the arm64 tests
425+ run : |
426+ set -e
427+ arch -arm64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
428+
429+ - name : Unmount the DMG
430+ if : always()
431+ run : |
432+ set -e
433+ MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
434+ echo "Unmounting DMG at $MOUNT_POINT"
435+ hdiutil detach "$MOUNT_POINT"
436+
437+ - name : Upload the universal2 DMG artifact
438+ uses : actions/upload-artifact@v4
439+ with :
440+ name : macos-universal2-dmg
441+ path : dist/*.dmg
442+ retention-days : 1
0 commit comments