From 8344738968ed5e4b0b9c27c310df4cad21f4c77b Mon Sep 17 00:00:00 2001 From: Ozgur Ersoy Date: Wed, 16 Apr 2025 23:45:16 +0200 Subject: [PATCH] fix(actions): update macOS notarization workflow to include Homebrew installation and DMG upload step for improved artifact management --- .gitea/workflows/test-macos-build.yml | 42 ++++++++++++++++++++------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/test-macos-build.yml b/.gitea/workflows/test-macos-build.yml index 6727212b..0ed54704 100644 --- a/.gitea/workflows/test-macos-build.yml +++ b/.gitea/workflows/test-macos-build.yml @@ -165,7 +165,37 @@ jobs: notary-api-key-path: ${{ secrets.NOTARY_API_KEY_PATH }} bundle-id: ${{ env.BUNDLE_ID }} fallback-to-adhoc: 'false' - + + # Upload only the DMG file from the macos-notarize action + - name: Upload Standard DMG + uses: actions/upload-artifact@v3 + if: steps.sign-and-notarize.outputs.notarized == 'true' && steps.sign-and-notarize.outputs.signed != 'none' + with: + name: LuckyWorld-macOS-Signed-Notarized-DMG + path: ${{ steps.sign-and-notarize.outputs.package-path }} + retention-days: 30 + + # Install create-dmg tool + - name: Install create-dmg tool + run: | + if ! command -v brew &> /dev/null; then + echo "Homebrew is not installed. Installing now..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + # Homebrew path'i environment'a ekle (Apple Silicon Mac için) + if [[ -d "/opt/homebrew/bin/" ]]; then + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile + eval "$(/opt/homebrew/bin/brew shellenv)" + fi + # Intel Mac için + if [[ -d "/usr/local/bin/" ]]; then + echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile + eval "$(/usr/local/bin/brew shellenv)" + fi + echo "Homebrew installed successfully!" + fi + brew install create-dmg + shell: bash + # Create custom DMG with installer script - name: Create Custom DMG with Installer if: steps.sign-and-notarize.outputs.notarized == 'true' && steps.sign-and-notarize.outputs.signed != 'none' @@ -197,15 +227,7 @@ jobs: name: LuckyWorld-macOS-Installer-DMG path: ${{ env.CUSTOM_DMG_PATH }} retention-days: 30 - - # Upload only the DMG file from the macos-notarize action - - name: Upload Standard DMG - uses: actions/upload-artifact@v3 - if: steps.sign-and-notarize.outputs.notarized == 'true' && steps.sign-and-notarize.outputs.signed != 'none' - with: - name: LuckyWorld-macOS-Signed-Notarized-DMG - path: ${{ steps.sign-and-notarize.outputs.package-path }} - retention-days: 30 + # Report results - name: Report Results