MacOS-pack.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: Packaging(MacOS)
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - feature/RND-680-macos-.dmg-package-build
  7. paths-ignore:
  8. - 'README.md'
  9. - 'LICENSE'
  10. pull_request:
  11. paths-ignore:
  12. - 'README.md'
  13. - 'LICENSE'
  14. env:
  15. PRODUCT: flameshot
  16. jobs:
  17. catalina:
  18. name: macOS Monterey 12
  19. runs-on: macos-12
  20. env:
  21. APP_NAME: flameshot
  22. DIR_BULD: build
  23. DIR_PKG: build/src
  24. HELPERS_SCRIPTS_PATH: ../../packaging/macos
  25. # Apple developer identity, example: "Developer ID Application: <user name> (code)"
  26. # Note: no signing and notarization will be proceed if this variable is not set
  27. APPLE_DEV_IDENTITY: ${{ secrets.APPLE_DEV_IDENTITY }}
  28. # Apple ID user
  29. APPLE_DEV_USER: ${{ secrets.APPLE_DEV_USER }}
  30. # Apple ID user password
  31. APPLE_DEV_PASS: ${{ secrets.APPLE_DEV_PASS }}
  32. # Apple certificate with private and public keys in base64 format
  33. APPLE_DEVELOPER_ID_APPLICATION_CERT_DATA: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERT_DATA }}
  34. # Apple certificate password
  35. APPLE_DEVELOPER_ID_APPLICATION_CERT_PASS: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERT_PASS }}
  36. # Any temporary password for keychain, which will be created on github actions CI
  37. APPLE_TEMP_CI_KEYCHAIN_PASS: ${{ secrets.APPLE_TEMP_CI_KEYCHAIN_PASS }}
  38. # Temporary variable for internal use, it will be set on the "Build dmg" step
  39. NOTARIZATION_CHECK: false
  40. steps:
  41. - name: Checkout Source code
  42. uses: actions/checkout@v4
  43. - name: Install Qt
  44. run: brew install qt@5 cmake
  45. - name: Configure
  46. run: |
  47. rm -rf "${DIR_BULD}"/src/flameshot.dmg "${DIR_BULD}"/src/flameshot.app/
  48. cmake -S . -B "${DIR_BULD}" -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 -DUSE_MONOCHROME_ICON=True
  49. - name: Compile
  50. run: |
  51. cmake --build "${DIR_BULD}"
  52. - name: Create key-chain and import certificate
  53. run: |
  54. cd "${DIR_PKG}"
  55. ${HELPERS_SCRIPTS_PATH}/create_keychain.sh flameshot
  56. - name: Build dmg package
  57. run: |
  58. cd "${DIR_PKG}"
  59. ${HELPERS_SCRIPTS_PATH}/sign_qtapp.sh flameshot
  60. - name: Upload dmg package
  61. shell: bash
  62. run: |
  63. python3 -m pip install -U -q requests
  64. echo "================MacOS dmg image download link================"
  65. echo $(python3 $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/src/flameshot.dmg)
  66. echo "=====no operation for you can see link in the log console====="
  67. - name: Artifact Upload
  68. uses: actions/upload-artifact@v3
  69. with:
  70. name: MacOS-artifact
  71. path: ${{ github.workspace }}/build/src/flameshot.dmg
  72. - name: Notarization status
  73. shell: bash
  74. run: |
  75. if [[ "${NOTARIZATION_CHECK}" == "true" ]]; then
  76. echo "Notarization check succeed"
  77. else
  78. echo "::warning Notarization check failed"
  79. # exit 1
  80. fi