Skip to content

Commit

Permalink
Upload the release App as an artifact and download it when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroboron committed Apr 17, 2024
1 parent 9436645 commit 705d140
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/create_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,17 @@ jobs:
.github
scripts
- name: Download DMG artifact
id: download-dmg-artifact
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: duckduckgo-dmg
path: ${{ github.workspace }}/dmg

- name: Download release app
# Download the release app only if download-dmg-artifact fails
if: ${{ steps.download-dmg-artifact.outcome == 'failure' }}
run: |
curl -fLSs "${{ vars.RELEASE_DMG_URL }}" --output duckduckgo.dmg
hdiutil attach duckduckgo.dmg -mountpoint vanilla
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,35 @@ jobs:
atb-asana-task-id: ${{ vars.DMG_VARIANTS_LIST_TASK_ID }}
origin-asana-section-id: ${{ vars.DMG_VARIANTS_ORIGIN_SECTION_ID }}

download-dmg-and-upload-artifact:

name: Download Release App and upload artifact

runs-on: macos-13
timeout-minutes: 15

steps:
- 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
retention-days: 1


create-variants:

name: Create Variant
needs: set-up-variants
needs: [set-up-variants, download-dmg-and-upload-artifact]

strategy:
fail-fast: false
Expand Down

0 comments on commit 705d140

Please sign in to comment.