From b6815b2731ccae548feed61d5672c7637db1fba2 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 24 Apr 2023 12:24:36 +0100 Subject: [PATCH] Exclude some artifacts from PR builds (#891) --- .github/workflows/build_and_test.yaml | 4 ++-- .github/workflows/build_linux.yaml | 5 ++++- .github/workflows/build_macos.yaml | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 2f1751e..c997c0b 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -106,8 +106,8 @@ jobs: - name: macOS Universal os: macos artifact: macos - executable: "./dist/mac-universal/Element.app/Contents/MacOS/Element" - prepare_cmd: "find ./dist/mac-universal/Element.app -type f | perl -lne 'print if -B' | tr '\\n' '\\0' | xargs -0 -n1 chmod 755" + executable: "/Volumes/Element/Element.app/Contents/MacOS/Element" + prepare_cmd: "hdiutil attach ./dist/*.dmg -mountpoint /Volumes/Element" - name: "Linux (amd64) (sqlcipher: system)" os: ubuntu artifact: linux-amd64-sqlcipher-system diff --git a/.github/workflows/build_linux.yaml b/.github/workflows/build_linux.yaml index 866e2cf..f627631 100644 --- a/.github/workflows/build_linux.yaml +++ b/.github/workflows/build_linux.yaml @@ -193,9 +193,12 @@ jobs: ln -s "$(find . -type f -iname "*.tar.gz" | xargs -0 -n1 -- basename)" "element-desktop.tar.gz" working-directory: "dist/install/linux/glibc-x86-64" + # We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions - name: Upload Artifacts uses: actions/upload-artifact@v3 with: name: ${{ inputs.deploy-mode && 'packages.element.io' || format('linux-{0}-sqlcipher-{1}', inputs.arch, inputs.sqlcipher) }} - path: dist + path: | + dist + !dist/*-unpacked/** retention-days: 1 diff --git a/.github/workflows/build_macos.yaml b/.github/workflows/build_macos.yaml index e576243..733edbc 100644 --- a/.github/workflows/build_macos.yaml +++ b/.github/workflows/build_macos.yaml @@ -147,9 +147,12 @@ jobs: ln -s "$(find . -type f -iname "*.dmg" | xargs -0 -n1 -- basename)" "Element.dmg" working-directory: "dist/install/macos" + # We exclude mac-universal as the unpacked app takes forever to upload and zip and dmg already contain it - name: Upload Artifacts uses: actions/upload-artifact@v3 with: name: ${{ inputs.deploy-mode && 'packages.element.io' || 'macos' }} - path: dist + path: | + dist + !dist/mac-universal/** retention-days: 1