From 8a1ab135c72f1a51a5dcac7da8f5e2fe22571ef5 Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Wed, 15 Nov 2023 14:52:46 +0200 Subject: [PATCH] djkdskj --- .github/actions/publish/action.yml | 36 ++++++++++++++---------------- .github/actions/test/action.yml | 15 +++++-------- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index e5e6de814f5..36ef689606d 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -29,13 +29,11 @@ runs: - name: Extract custom source artifact if: runner.os != 'Windows' - shell: bash working-directory: . run: tar -xf ${{ runner.temp }}/custom.tgz - name: Extract custom source artifact if: runner.os == 'Windows' - shell: pwsh working-directory: . run: C:\"Program Files"\Git\usr\bin\tar.exe --force-local -xf ${{ runner.temp }}\custom.tgz @@ -47,11 +45,7 @@ runs: - name: Install host dependencies if: runner.os == 'Linux' - shell: bash - run: | - set -ea - sudo apt-get update - sudo apt-get install -y --no-install-recommends fakeroot dpkg rpm + run: sudo apt-get install -y --no-install-recommends fakeroot dpkg rpm - name: Install host dependencies if: runner.os == 'macOS' @@ -102,23 +96,27 @@ runs: encodedString: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING }} - name: Package release - id: package_release if: runner.os != 'Windows' shell: bash - run: | - ./build/make-all.sh - APPLICATION_VERSION="$(jq -r '.version' package.json)" - echo "version=${APPLICATION_VERSION}" >> $GITHUB_OUTPUT + run: ./build/make-all.sh + env: + # ensure we sign the artifacts + NODE_ENV: production + # Apple notarization + XCODE_APP_LOADER_EMAIL: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_EMAIL }} + XCODE_APP_LOADER_PASSWORD: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_PASSWORD }} + XCODE_APP_LOADER_TEAM_ID: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_TEAM_ID }} + # Windows signing + WINDOWS_SIGNING_CERT_PATH: ${{ steps.import_win_signing_cert.outputs.filePath }} + WINDOWS_SIGNING_PASSWORD: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING_PASSWORD }} + # https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/#improvements-for-public-repository-forks + # https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks + CSC_FOR_PULL_REQUEST: true - name: Package release - id: package_release if: runner.os == 'Windows' - shell: powershell # npm run make fails on bash on windows - run: | - ./build/make-all.sh - APPLICATION_VERSION="$(jq -r '.version' package.json)" - echo "version=${APPLICATION_VERSION}" >> $GITHUB_OUTPUT - + shell: powershell # npm run make fails on bash on windows; some node-gyp weirdness + run: ./build/make-all.sh env: # ensure we sign the artifacts NODE_ENV: production diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index d56bb3b2e7e..9ba2786b328 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -30,10 +30,7 @@ runs: - name: Install host dependencies if: runner.os == 'Linux' - shell: bash --noprofile --norc -eo pipefail -x {0} run: | - set -ea - sudo apt-get update sudo apt-get install -y --no-install-recommends xvfb libudev-dev cat < package.json | jq -r '.hostDependencies[][]' - | \ xargs -L1 echo | sed 's/|//g' | xargs -L1 \ @@ -48,24 +45,22 @@ runs: with: python-version: '3.11' + - name: Install project dependencies + run: npm ci + - name: Test release - shell: bash --noprofile --norc -eo pipefail -x {0} - run: | - set -ea - npm ci - ./build/test-all.sh + shell: bash + run: ./build/test-all.sh env: # https://www.electronjs.org/docs/latest/api/environment-variables ELECTRON_NO_ATTACH_CONSOLE: 'true' - name: Compress custom source if: runner.os != 'Windows' - shell: pwsh run: tar -acf ${{ runner.temp }}/custom.tgz . - name: Compress custom source if: runner.os == 'Windows' - shell: pwsh run: C:\"Program Files"\Git\usr\bin\tar.exe --force-local -acf ${{ runner.temp }}\custom.tgz . - name: Upload custom artifact