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 f547d59
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 37 deletions.
49 changes: 21 additions & 28 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,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 @@ -101,37 +98,33 @@ runs:
fileName: 'win-cert.pfx'
encodedString: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING }}

x-package-release-env: &package-release-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: 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:
<<: *package-release-env

- 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
# 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
<<: *package-release-env

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
17 changes: 8 additions & 9 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ runs:

- name: Install host dependencies
if: runner.os == 'Linux'
shell: bash --noprofile --norc -eo pipefail -x {0}
shell: bash
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,19 +46,20 @@ runs:
with:
python-version: '3.11'

- name: Install project dependencies
shell: bash
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
shell: bash
run: tar -acf ${{ runner.temp }}/custom.tgz .

- name: Compress custom source
Expand Down

0 comments on commit f547d59

Please sign in to comment.