MacOS-pack.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 Catalina 10.15
  19. runs-on: macos-10.15
  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 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@v1
  43. - name: Install Qt
  44. run: brew install qt@5 cmake
  45. - name: Configure
  46. run: |
  47. mkdir -p "${DIR_BULD}"
  48. cd "${DIR_BULD}"
  49. rm -rf ./src/flameshot.dmg ./src/flameshot.app/
  50. cmake .. -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 -DUSE_MONOCHROME_ICON=True
  51. - name: Compile
  52. run: |
  53. cd "${DIR_BULD}"
  54. make
  55. - name: Create key-chain and import certificate
  56. run: |
  57. cd "${DIR_PKG}"
  58. ${HELPERS_SCRIPTS_PATH}/create_keychain.sh flameshot
  59. - name: Build dmg package
  60. run: |
  61. cd "${DIR_PKG}"
  62. ${HELPERS_SCRIPTS_PATH}/sign_qtapp.sh flameshot
  63. - name: Upload dmg package
  64. shell: bash
  65. run: |
  66. python3 -m pip install -U -q requests
  67. echo "================MacOS dmg image download link================"
  68. echo $(python3 $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/src/flameshot.dmg)
  69. echo "=====no operation for you can see link in the log console====="
  70. - name: Artifact Upload
  71. uses: actions/upload-artifact@v2
  72. with:
  73. name: MacOS-artifact
  74. path: ${{ github.workspace }}/build/src/flameshot.dmg
  75. - name: Notarization status
  76. shell: bash
  77. run: |
  78. if [[ "${NOTARIZATION_CHECK}" == "true" ]]; then
  79. echo "Notarization check succeed"
  80. else
  81. echo "::warning Notarization check failed"
  82. # exit 1
  83. fi