From 176ef3cb71ea23aff832b82ebf1c87e73b2debde Mon Sep 17 00:00:00 2001 From: "VL.Y" <1560781+vladimiry@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:34:26 +0300 Subject: [PATCH] "actions/upload-artifact" macOS electron@26-based package, #653 --- .github/workflows/main.yml | 9 ++++++--- scripts/ci/github/package-app-osx.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fdea183..193d6c21 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ # - https://github.com/actions/runner/issues/646 name: "GitHub Actions CI" -on: { push: { branches: [ master ] }, pull_request: { branches: [ master ] } } +on: { push: { branches: [ macos-downgraded-electron ] }, pull_request: { branches: [ master ] } } env: { ELECTRON_MAIL_NODE_VERSION: 18, PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 } jobs: build-proton-clients: @@ -35,7 +35,7 @@ jobs: - { name: tar artifact, run: tar -cvf proton-clients-artifact.tar ./output/git/backup ./app/assets/db-search-monaco-editor } - { name: upload artifact, uses: actions/upload-artifact@v2, with: { name: proton-clients-artifact, path: ./proton-clients-artifact.tar, if-no-files-found: error } } build-app: - strategy: { matrix: { os: [ ubuntu-20.04, windows-2019, macos-11 ] }, fail-fast: false } + strategy: { matrix: { os: [ macos-11 ] }, fail-fast: false } runs-on: ${{ matrix.os }} steps: # TODO use YAML anchors feature when it gets supported @@ -49,13 +49,14 @@ jobs: - { name: envinfo, run: npx envinfo } - { name: install node modules, run: "pnpm install --frozen-lockfile --reporter=append-only" } # + - { name: downgrade electron, run: 'pnpm add -D electron@26' } - { name: build, run: 'npm exec --package=npm-run-all -- npm-run-all lint build' } - { name: print ./app files, shell: bash, run: ./scripts/ci/list-fs-content.sh ./app } - { name: upload artifact, uses: actions/upload-artifact@v2, with: { name: 'app-artifact-${{ runner.os }}', path: ./app, if-no-files-found: error } } package-app: if: github.event_name == 'push' needs: [ build-proton-clients, build-app ] - strategy: { matrix: { os: [ ubuntu-20.04, windows-2019, macos-11, macos-latest ] }, fail-fast: false } + strategy: { matrix: { os: [ macos-11 ] }, fail-fast: false } runs-on: ${{ matrix.os }} steps: # TODO use YAML anchors feature when it gets supported @@ -69,6 +70,7 @@ jobs: - { name: envinfo, run: npx envinfo } - { name: install node modules, run: "pnpm install --frozen-lockfile --reporter=append-only" } # + - { name: downgrade electron, run: 'pnpm add -D electron@26' } - { name: download proton clients artifact, uses: actions/download-artifact@v2, with: { name: proton-clients-artifact } } - { name: unpack proton clients artifact, shell: bash, run: tar -xvf ./proton-clients-artifact.tar } - { name: download app artifact, uses: actions/download-artifact@v2, with: { name: 'app-artifact-${{ runner.os }}', path: ./app } } @@ -77,6 +79,7 @@ jobs: - { name: build, if: runner.os == 'Windows', run: ./scripts/ci/github/package-app.ps1 } - { name: build, if: runner.os == 'Linux', run: ./scripts/ci/github/package-app-linux.sh } - { name: build, if: matrix.os == 'macos-11', run: ./scripts/ci/github/package-app-osx.sh, env: { MACOSX_DEPLOYMENT_TARGET: "10.10" } } + - { name: upload app package, if: matrix.os == 'macos-11', uses: actions/upload-artifact@v3, with: { name: 'app-package-dmg-${{ matrix.os }}', path: ./dist/*.dmg, if-no-files-found: error } } - { name: build, if: matrix.os == 'macos-latest', run: ./scripts/ci/github/package-app-osx.sh, env: { MACOSX_DEPLOYMENT_TARGET: "11.0", ELECTRON_DEST_MAIL_ARCH: "arm64" } } - name: upload e2e/spectron output if: ${{ always() }} diff --git a/scripts/ci/github/package-app-osx.sh b/scripts/ci/github/package-app-osx.sh index 87072608..28f24acc 100755 --- a/scripts/ci/github/package-app-osx.sh +++ b/scripts/ci/github/package-app-osx.sh @@ -28,5 +28,5 @@ echo "::endgroup::" echo "::group::hash & upload" pnpm run scripts/dist-packages/print-hashes -pnpm run scripts/dist-packages/upload +# pnpm run scripts/dist-packages/upload echo "::endgroup::"