From 20022a2f2d2027f7cf1d725d5bdd3ff0ea26c8c2 Mon Sep 17 00:00:00 2001 From: Alessandro Boron Date: Fri, 19 Apr 2024 15:20:32 +1000 Subject: [PATCH] Test uploading/downloading dmg --- .github/workflows/create_variant.yml | 15 +++++++++++++-- .github/workflows/create_variants.yml | 7 +------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create_variant.yml b/.github/workflows/create_variant.yml index 7469b43638..37dced21fd 100644 --- a/.github/workflows/create_variant.yml +++ b/.github/workflows/create_variant.yml @@ -92,11 +92,22 @@ jobs: uses: actions/download-artifact@v4 with: name: duckduckgo-dmg - path: ${{ github.workspace }}/dmg/DuckDuckGo.app + path: ${{ github.workspace }}/duckduckgo.dmg + + - name: Extract App from DMG + id: extract-app-from-dmg + if: ${{ steps.download-dmg-artifact.outcome == 'success' }} + continue-on-error: true + run: | + hdiutil attach duckduckgo.dmg -mountpoint vanilla + mkdir -p dmg + cp -R vanilla/DuckDuckGo.app dmg/DuckDuckGo.app + hdiutil detach vanilla + rm -f duckduckgo.dmg - name: Download release app # Download the release app only if download-dmg-artifact fails - if: ${{ steps.download-dmg-artifact.outcome == 'failure' }} + if: ${{ steps.extract-app-from-dmg.outcome == 'failure' }} run: | curl -fLSs "${{ vars.RELEASE_DMG_URL }}" --output duckduckgo.dmg hdiutil attach duckduckgo.dmg -mountpoint vanilla diff --git a/.github/workflows/create_variants.yml b/.github/workflows/create_variants.yml index a7786b741e..860d8a62d2 100644 --- a/.github/workflows/create_variants.yml +++ b/.github/workflows/create_variants.yml @@ -83,17 +83,12 @@ jobs: - name: Download release app run: | curl -fLSs "${{ vars.RELEASE_DMG_URL }}" --output duckduckgo.dmg - hdiutil attach duckduckgo.dmg -mountpoint vanilla - mkdir -p dmg - cp -R vanilla/DuckDuckGo.app dmg/DuckDuckGo.app - hdiutil detach vanilla - rm -f duckduckgo.dmg - name: Upload DMG artifact uses: actions/upload-artifact@v4 with: name: duckduckgo-dmg - path: ${{ github.workspace }}/dmg/DuckDuckGo.app + path: ${{ github.workspace }}/duckduckgo.dmg retention-days: 1