Skip to content

Commit

Permalink
djkdskj
Browse files Browse the repository at this point in the history
  • Loading branch information
dfunckt committed Nov 15, 2023
1 parent 1bd9e0d commit 8a1ab13
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
36 changes: 17 additions & 19 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down
15 changes: 5 additions & 10 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 8a1ab13

Please sign in to comment.