diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 00ef703cd5b..086cfd1cf15 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -92,6 +92,9 @@ jobs: cura-installer-create: runs-on: ${{ inputs.operating_system }} + outputs: + INSTALLER_FILENAME: ${{ steps.filename.outputs.INSTALLER_FILENAME }} + steps: - name: Checkout uses: actions/checkout@v3 @@ -238,29 +241,105 @@ jobs: for package in pkg_resources.working_set: f.writelines(f"`{package.key}/{package.version}`\n") + - name: upload the dist folder + uses: actions/upload-artifact@v3 + with: + name: dist + path: | + dist/ + retention-days: 5 + + cura-installer-create-dmg: + needs: [ cura-installer-create ] + runs-on: macos-11 + steps: + - name: Download the dist + uses: actions/download-artifact@v3 + with: + name: dist + + - name: Remove Macos keychain (Bash) + run: security delete-keychain signing_temp.keychain || true + + - name: Configure Macos keychain Developer Cert(Bash) + id: macos-keychain-developer-cert + uses: apple-actions/import-codesign-certs@v1 + with: + keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} + p12-file-base64: ${{ secrets.MACOS_CERT_P12 }} + p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} + + - name: Configure Macos keychain Installer Cert (Bash) + id: macos-keychain-installer-cert + uses: apple-actions/import-codesign-certs@v1 + with: + keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} + create-keychain: false # keychain is created in previous use of action. + p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} + p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} + + - name: Install MacOS system requirements + run: brew install create-dmg + - name: Create the Macos dmg and pkg (Bash) - run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ steps.filename.outputs.INSTALLER_FILENAME }}" --build_pkg --build_dmg --app_name "$CURA_APP_NAME" + run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_dmg --app_name "$CURA_APP_NAME" working-directory: dist - - name: Upload the pkg + - name: Upload the dmg uses: actions/upload-artifact@v3 with: - name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-pkg + name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-dmg path: | - dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.pkg + dist/${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.dmg retention-days: 5 - - name: Upload the dmg + cura-installer-create-pkg: + needs: [ cura-installer-create ] + runs-on: macos-11 + steps: + - name: Download the dist + uses: actions/download-artifact@v3 + with: + name: dist + + - name: Remove Macos keychain (Bash) + run: security delete-keychain signing_temp.keychain || true + + - name: Configure Macos keychain Developer Cert(Bash) + id: macos-keychain-developer-cert + uses: apple-actions/import-codesign-certs@v1 + with: + keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} + p12-file-base64: ${{ secrets.MACOS_CERT_P12 }} + p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} + + - name: Configure Macos keychain Installer Cert (Bash) + id: macos-keychain-installer-cert + uses: apple-actions/import-codesign-certs@v1 + with: + keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }} + create-keychain: false # keychain is created in previous use of action. + p12-file-base64: ${{ secrets.MACOS_CERT_INSTALLER_P12 }} + p12-password: ${{ secrets.MACOS_CERT_PASSPHRASE }} + + - name: Install MacOS system requirements + run: brew install create-dmg + + - name: Create the Macos dmg and pkg (Bash) + run: python ../cura_inst/packaging/MacOS/build_macos.py --source_path ../cura_inst --dist_path . --cura_conan_version $CURA_CONAN_VERSION --filename "${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}" --build_pkg --app_name "$CURA_APP_NAME" + working-directory: dist + + - name: Upload the pkg uses: actions/upload-artifact@v3 with: - name: ${{ steps.filename.outputs.INSTALLER_FILENAME }}-dmg + name: ${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}-pkg path: | - dist/${{ steps.filename.outputs.INSTALLER_FILENAME }}.dmg + dist/${{ needs.cura-installer-create.outputs.INSTALLER_FILENAME }}.pkg retention-days: 5 notify-export: if: ${{ always() }} - needs: [ cura-installer-create ] + needs: [ cura-installer-create-dmg, cura-installer-create-pkg ] uses: ultimaker/cura/.github/workflows/notify.yml@main with: