Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
6353866
feat: OS-14592 Create BrightSign CI workflows
t-bashir-bs Apr 19, 2024
67a9eec
feat: OS-14993 Make redirects from one file to another transparent (#12)
t-bashir-bs Apr 19, 2024
96b26cf
feat: OS-14967 Patch to force mime sniffing for file urls in Chromium…
t-bashir-bs Mar 20, 2023
571273c
feat : backport, Allow partitions to have app set quotas OS-14197 (#14)
gecko19 Apr 5, 2023
0cf7a25
feat: Add BrightSign custom set-z-index feature to Wayland (#17)
t-bashir-bs May 10, 2023
d78a711
OS-14339: Support negative window offsets (#18)
t-bashir-bs May 12, 2023
f59a20c
feat: Add hideScrollBars BrowserWindow constructor param (#19)
t-bashir-bs May 15, 2023
6127ae4
feat: Use remote-debugging-address in devtools (#26)
t-bashir-bs Jun 29, 2023
370cbab
feat: Add a webpreference to disable pinch to zoom (#24)
t-bashir-bs Apr 23, 2024
566d8c7
feat: Add will-open-dialog event to webcontents (#30)
t-bashir-bs Jul 6, 2023
782601e
fix: Patch mime sniffer for html utf8 bom, svg and xml files OS-16547…
t-bashir-bs Jan 15, 2024
b2ca781
fix: Allow websites from file:// domain to access cookies OS-16546 (#40)
t-bashir-bs Jan 16, 2024
996ca5b
fix: Fix weston-keyboard backspace problem with existing text
caneraltinbasak Jul 17, 2023
7daf599
fix: Retry wayland display server connection before giving up (#29)
caneraltinbasak Jul 4, 2023
ff92aec
feat: Add support for brightsign video player
t-bashir-bs Apr 24, 2024
54252c3
feat: OS-14887 video player reuse (#43)
t-bashir-bs Apr 16, 2024
b89648f
fix: clang14 build fixes
caneraltinbasak Apr 29, 2024
efbc6d6
fix: Fix the build for ozone non-x11 builds
caneraltinbasak Apr 29, 2024
5f26b17
fix: Remove X11 dependencies
caneraltinbasak Apr 29, 2024
5a51e91
feat: Add bs z-order absolute level
caneraltinbasak Apr 29, 2024
e16d7f0
feat: Add support for changing opacity on ozone wayland platform
caneraltinbasak Apr 29, 2024
703d152
feat: Add support for SetIgnoreMouseEvents on Wayland platform
caneraltinbasak Apr 29, 2024
367fa4d
actions: Disable GPU when run unit tests on CI
t-bashir-bs May 2, 2024
bc5f297
fix: Re-created the patches for Electron28
caneraltinbasak Apr 30, 2024
f482592
fix: Fix media player interface after Electron28 upgrade
caneraltinbasak Apr 30, 2024
a5fdfaa
fix: Fix the BrowserWindow.setAlwaysOnTop test
caneraltinbasak May 1, 2024
e355132
fix: Fix setOpacity test
caneraltinbasak May 1, 2024
a13b32a
fix: MacOS compilation (#49)
t-bashir-bs May 2, 2024
1020905
fix: Set ignore mouse event compilation flag error (#52)
t-bashir-bs May 8, 2024
4844399
feat: Add SetOpacity to linux ozone wayland: OS-16623 (#51)
t-bashir-bs May 8, 2024
98f6c11
fix: negative window offsets patch OS-17214 (#53)
t-bashir-bs May 8, 2024
a9e342c
fix: correct setopacity patch (#54)
t-bashir-bs May 17, 2024
8394ebb
OS-17230: Fix ozone image memory leak
t-bashir-bs May 22, 2024
d688865
feat: Adds custom BrightSign video attributes and fixes (#57)
t-bashir-bs Jun 17, 2024
5f3ff50
feat: Use same nssdb path for roKeyStore and Chromium OS-17053 (#56)
t-bashir-bs Jun 17, 2024
301dfbc
feat: Implement setting uid and groups for renderer process OS-17053…
t-bashir-bs Jun 17, 2024
f1f1bc6
fix: Always check bounds are not 0 in SetWindowGeometry OS-17405 (#59)
t-bashir-bs Jul 11, 2024
2400e2e
fix: Increase file handle limit for renderer OS-17400 (#60)
t-bashir-bs Jul 12, 2024
c6b64dc
fix: Disable DMSAA OS-17477 (#61)
t-bashir-bs Jul 16, 2024
2299046
gtk: Compile Electron without GTK
t-bashir-bs Jul 24, 2024
ccbe508
ozone: Add nexus backend for ozone
t-bashir-bs Jul 26, 2024
a6d543a
zygote: Disable single thread check when lttng is enabled. OS-12162
t-bashir-bs Aug 2, 2024
8852405
OzoneNexus: libcursor and evdev support
t-bashir-bs Aug 5, 2024
0bcbd5f
Fix DIP scaling issue
Aug 29, 2024
fcb2ef8
overlay_processor_interface: Always use Ozone if Brightsign overlay s…
Aug 30, 2024
81cb162
fix: X and Y window offset setting (#63)
t-bashir-bs Sep 3, 2024
4ea0e8c
fix: Always check bounds are not 0 in SetBoundsInPixels: OS-17724 (#64)
t-bashir-bs Sep 6, 2024
1408a31
feat: Add Hide/Show support for Nexus Window OS-17706
Oct 16, 2024
acf4dcb
feat: Add window transparency support for Nexus backend
Oct 16, 2024
0947088
feat: Add support for window rotation OS-17652 (#65)
t-bashir-bs Oct 18, 2024
a9d3b19
Add support for eglGetPlatformDisplayExt
Oct 21, 2024
5d09884
test: Improve html window rotation tests (#67)
t-bashir-bs Oct 25, 2024
c3fc610
fix: Set correct blend equation when window is visible: OS-17983 (#69)
t-bashir-bs Oct 25, 2024
21bdd98
fix: Provide real screen dimensions in NexusScreen OS-18036 (#70)
t-bashir-bs Nov 8, 2024
fb38bc7
fix: Disable changing mouse cursor (OS-17765)
jdye-bs Nov 14, 2024
96a6d5d
fix: Add missing implementation for rotating popups in html widgets …
t-bashir-bs Nov 21, 2024
9e16132
fix: Fix eglGetPlatformDisplayEXT OS-18172
Nov 26, 2024
d6468e1
fix: Disable software compositing for tooltips on Nexus OS-18037 (#73)
t-bashir-bs Nov 26, 2024
83c8b14
fix: Fix html select element popups not getting mouse input (#76)
t-bashir-bs Dec 3, 2024
a151faa
feat: Allow MSE to be disabled with disable-blink-features: OS-18170 …
t-bashir-bs Dec 4, 2024
dfb34c8
fix: Do not convert tooltip position to screen coordinates for waylan…
t-bashir-bs Dec 4, 2024
402d304
feat: Add virtual-keyboard-visibility-changed event OS-18421
Jan 14, 2025
053fd09
fix(nexus): Fix window focus management for VK OS-17597
caneraltinbasak Jan 29, 2025
ec30bd2
fix: Fix window keyboard focus management on ozone-nexus OS-18564
caneraltinbasak Jan 30, 2025
4786ac9
fix(wayland_window): Always dispatch KeyEvent OS-18589
caneraltinbasak Jan 31, 2025
771a51a
fix(wayland): Track keyboard focus OS-18548, OS-17052
caneraltinbasak Feb 26, 2025
4fe26ff
feat: Short-circuit same origin check for frame load if websecurity i…
t-bashir-bs Feb 27, 2025
6e9c0ed
fix(nexus): Fix manual focus tracking with NexusWindow OS-18746
caneraltinbasak Feb 28, 2025
66d0d01
fix: Fix reset when window.close is called OS-18755 (#90)
t-bashir-bs Mar 7, 2025
806b356
fix(wayland_window): Focus on newly created widget OS-18791
caneraltinbasak Mar 7, 2025
73c6a00
fix: set visibility when video player is hidden with display none OS-…
t-bashir-bs Mar 14, 2025
7629cc7
feat: Add blob data fetching OS-18647 (#94)
t-bashir-bs Mar 26, 2025
57da05f
fix: OS-17206 fix video punch through with transparency (#93)
t-bashir-bs Mar 26, 2025
661ace1
feat: Add getMediaResource to fetch cookie and auth params OS-16991 (…
t-bashir-bs Mar 31, 2025
6d44b1e
fix(ozone-nexus): Fix touch screen resolution OS-19061
caneraltinbasak Apr 28, 2025
6b5e719
fix(nexus-ozone): Focus on window at creation OS-17052
caneraltinbasak Apr 28, 2025
0ad4d64
feat(audio-video-tracks): Added support for html5 video-audio tracks …
caneraltinbasak May 12, 2025
6877f88
feat(text_tracks): Add support for in-band text tracks OS-18886
caneraltinbasak May 14, 2025
54067f0
fix(text_tracks): Fix crash when playing audio only OS-19237 (#100)
t-bashir-bs May 19, 2025
a9df0d8
feat: Add addFont api call to app: OS-14352 (#101)
t-bashir-bs Jun 9, 2025
b5c1642
feat: Add switch to disable font matching cache: OS-14352 (#102)
t-bashir-bs Jun 12, 2025
b99d3c2
fix: overlay strategy for html pages with transparency OS-19250 (#104)
t-bashir-bs Jun 20, 2025
780f6e2
fix: Add paths to _nodeModulePaths for Brightsign objects OS-19543 (#…
t-bashir-bs Jul 16, 2025
5124be2
feat(patches): add SetOpacity support for NEXUS platform window OS-19127
caneraltinbasak Sep 15, 2025
b98987f
feat(ozone/nexus): Implement SetFullscreen for NexusWindow OS-19899
caneraltinbasak Sep 18, 2025
e64c065
fix(wayland_window): Call SetWindowGeometry for position updates OS-2…
caneraltinbasak Nov 27, 2025
34f318e
fix: Ensure callbacks are called on UI thread in error cases OS-20127…
t-bashir-bs Dec 3, 2025
bdb3a66
feat: Enable pressure monitor in linux and for render process OS-2036…
t-bashir-bs Dec 3, 2025
0a1966f
feat: Add MSE support for series 3 & 4 devices OS-19598 (#111)
t-bashir-bs Dec 16, 2025
fefb0ee
fix: Fix touch events with rotation OS-20284 (#112)
t-bashir-bs Dec 18, 2025
874d48e
fix: Disable the error page being displayed on navigation errors (#113)
t-bashir-bs Dec 19, 2025
36e0620
feat: Enable hls mimetype support OS-20673
caneraltinbasak Jan 30, 2026
67308e2
feat: Add video/audio-codecs-supported flag support OS-20675
caneraltinbasak Jan 30, 2026
16622e2
build: enable Perfetto in Chromium (#41880) (#117)
t-bashir-bs Feb 10, 2026
62599e9
feat: Enable viewport options when viewport-enabled OS-20339 (#119)
t-bashir-bs Feb 23, 2026
3101b36
feat: add memoryPressureMonitor API OS-20753, OS-20754
caneraltinbasak Feb 12, 2026
e631f91
feat: propagate memory pressure notifications to renderer processes O…
caneraltinbasak Feb 12, 2026
7aecec6
Remove Chromium's built-in MemoryPressureMonitor OS-20756, OS-20753
caneraltinbasak Feb 12, 2026
ff8ed5e
update ec2-github-runner with latest github runner
caneraltinbasak Mar 2, 2026
9dd8783
feat: Add Perfetto trace to VideoHoleDraw (#120)
t-bashir-bs Mar 9, 2026
64c27d9
feat: Optimise window show time OS-20603 (#121)
t-bashir-bs Mar 9, 2026
2f442e3
feat: Add setLanguage API to webcontents OS-20941 (#122)
t-bashir-bs Mar 12, 2026
7ab2b8f
fix: enable PDF viewer in incognito and when site isolation is off OS…
caneraltinbasak Mar 9, 2026
0795caa
fix: Correct time zone deficiencies OS-20888 (#124)
t-bashir-bs Mar 13, 2026
b2624b5
feat: Add mouse wheel scrolling for series 3&4 OS-20896 (#125)
t-bashir-bs Mar 23, 2026
ac38b31
fix: stop mouse cursor going off screen OS-20971 (#126)
t-bashir-bs Mar 23, 2026
88b9f82
fix: issues with semi-transparent videos OS-20978 (#127)
t-bashir-bs Mar 24, 2026
ec16036
fix(wayland): Use surface activation control protocol for unfocusable…
caneraltinbasak Apr 8, 2026
d753794
chore: Fix patch check error
rsmith-brightsign Apr 13, 2026
489a4aa
feat: Move z-order management to the compositor OS-20183
rsmith-brightsign Apr 8, 2026
b89273f
fix(ozone/nexus): Fix IsVisible() to account for window opacity OS-21210
caneraltinbasak Apr 20, 2026
1ef798c
fix(ozone/nexus): Transfer keyboard focus to next window on destroy O…
caneraltinbasak Apr 20, 2026
5165b7c
ozone/nexus: Assign VirtualKeyboard role to overlay windows OS-20973
caneraltinbasak Apr 13, 2026
e00b1e5
ci: update EC2 AMI to 200GB disk image
caneraltinbasak Apr 20, 2026
e7b3d0b
feat: Add further optimisations for Show using opacity change OS-2060…
t-bashir-bs Apr 22, 2026
9af9f37
fix(electron-ozone): NativeWindowViews leak on rohtmlwidget cycle OS-…
gostoshbs May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 299 additions & 0 deletions .github/workflows/bs_electron_build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
name: 'BrightSign Build and Test Electron: Build and test workflow'
on:
workflow_call:
inputs:
runner_name:
required: true
type: string

github_hosted_runner:
required: true
type: boolean

build_type:
required: true
type: string
# "test" or "release"

aws_arn_role:
required: true
type: string

aws_region:
required: true
type: string

jobs:
build-and-test-electron:
name: Build and Test Electron
runs-on: ${{ inputs.runner_name }}
defaults:
run:
working-directory: ./

steps:
# Cleanups only needed for self hosted runners
# - name: Clean up work dir (temp instead of colpal/actions-clean@v1, until docker usage issue with sock file permissions sorted)
# run: rm -rf *

# - name: Cleanup work dir
# uses: colpal/actions-clean@v1
# if: ${{ always() }} # To ensure this step runs even when earlier steps fail
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: ${{ inputs.aws_region}}
role-to-assume: ${{ inputs.aws_arn_role }}
# Set role-duration-seconds to 10 hours
role-duration-seconds: 36000

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Download config file and set env vars from it
run: |
aws s3 cp s3://electron-ci-config-bucket/config.json .
aws s3 cp s3://electron-ci-config-bucket/set_github_env_vars.py .
python3 set_github_env_vars.py --file config.json

- name: Check build type
if: inputs.build_type != 'test' && inputs.build_type != 'release'
run: |
echo "ERROR> build_type is set to \"${{ inputs.build_type }}\" and should be set to \"test\" or \"release\""
exit 1

- name: Install dependencies if Github hosted runner
if: inputs.github_hosted_runner == true
run: |
# From https://www.electronjs.org/docs/latest/development/build-instructions-linux
sudo apt-get update
sudo apt-get install -y build-essential clang libdbus-1-dev libgtk-3-dev \
libnotify-dev libasound2-dev libcap-dev \
libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib curl \
gperf bison python3-dbusmock openjdk-8-jre

# virtual framebuffer for running tests.
sudo apt install -y xvfb

# A fix for test case (to remove fonts-liberation that seems to be installed by default in Github default ubuntu image)...
# 2022-12-23T10:56:48.4520914Z not ok 2079 font fallback should use Helvetica for sans-serif on Mac, and Arial on Windows and Linux
# 2022-12-23T10:56:48.4522432Z AssertionError: expected 'Liberation Sans' to equal 'DejaVu Sans'
# 2022-12-23T10:56:48.4523556Z at Context.<anonymous> (electron/spec/chromium-spec.ts:2222:38)
sudo apt-get remove -y fonts-liberation

- name: Install and setup sccache
run: |
# export SCCACHE_ERROR_LOG="$PWD"/sccache.log
# export SCCACHE_LOG="info,sccache::cache=debug"

# curl -o sccache_package.tar.gz -L https://github.com/mozilla/sccache/releases/download/v0.3.3/sccache-v0.3.3-x86_64-unknown-linux-musl.tar.gz
# echo "427bd2151a1b01cd9b094d842e22c445b30f3c645f171a9a62ea55270f06bf23 sccache_package.tar.gz" | shasum -a 256 -c

curl -o sccache_package.tar.gz -L https://github.com/mozilla/sccache/releases/download/v0.4.0-pre.6/sccache-v0.4.0-pre.6-x86_64-unknown-linux-musl.tar.gz
echo "be5e423c546de2756337ccc1990eb842d85fa5255fb1c4f10a8b5788e18d3e22 sccache_package.tar.gz" | shasum -a 256 -c

tar xzf sccache_package.tar.gz --strip-components=1
sudo ln -s "$PWD"/sccache /usr/local/bin/sccache

# echo '/home/ubuntu/.cargo/bin/sccache' >> $GITHUB_PATH
echo 'SCCACHE_REGION=${{ inputs.aws_region }}' >> $GITHUB_ENV
echo 'SCCACHE_CACHE_SIZE=100G' >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v3
with:
path: ./src/electron
fetch-depth: 0

- name: Get electron_version
run: echo "ELECTRON_VERSION=v$(python3 ./src/electron/script/get-git-version.py)" >> $GITHUB_ENV

- name: Setup build type Testing
if: inputs.build_type == 'test'
run: |
echo "Setting up build type as testing"
echo 'OUTPUT_FOLDER=out/Testing' >> $GITHUB_ENV
echo 'GN_IMPORT=//electron/build/args/testing.gn' >> $GITHUB_ENV
echo 'SCCACHE_BUCKET=${{ env.SCCACHE_TEST_BUILD_BUCKET_NAME }}' >> $GITHUB_ENV

- name: Setup build type Release
if: inputs.build_type == 'release'
run: |
echo "Setting up build type as release"
echo 'OUTPUT_FOLDER=out/Release' >> $GITHUB_ENV
echo 'GN_IMPORT=//electron/build/args/release.gn' >> $GITHUB_ENV
echo 'SOURCE_RELEASE_FILE_NAME=${{ env.ELECTRON_VERSION }}' >> $GITHUB_ENV
echo 'RELEASE_SRC_FOLDER=${{ env.ELECTRON_VERSION }}' >> $GITHUB_ENV
echo 'RELEASE_DST_FOLDER=${{ env.ELECTRON_VERSION }}' >> $GITHUB_ENV
echo 'SCCACHE_BUCKET=${{ env.SCCACHE_RELEASE_BUILD_BUCKET_NAME }}' >> $GITHUB_ENV

- name: Display sccache config
run: |
# echo $SCCACHE_BUCKET $SCCACHE_REGION $SCCACHE_CACHE_SIZE

sccache -s

- name: Configure Git cache params
run: |
echo 'GIT_CACHE_FOLDER_NAME=git-cache' >> $GITHUB_ENV
echo 'GIT_CACHE_PATH='"$PWD"'/git-cache' >> $GITHUB_ENV
echo 'GIT_CACHE_FILENAME=git-cache-${{ hashFiles('src/electron/DEPS') }}.tar.gz' >> $GITHUB_ENV

- name: Get depot tools
run: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git

- name: Add depot tools to PATH
run: echo ''"$PWD"'/depot_tools' >> $GITHUB_PATH

- name: Retrieve git-cache
run: |
aws s3api head-object --bucket ${{ env.GIT_CACHE_BUCKET_NAME }} --key $GIT_CACHE_FILENAME || not_exist=true
if [ $not_exist ]; then
echo "Git cache ${GIT_CACHE_FILENAME} not found in bucket ${{ env.GIT_CACHE_BUCKET_NAME }}"
echo "GIT_CACHE_RESTORED=false" >> $GITHUB_ENV
else
echo "Git cache ${GIT_CACHE_FILENAME} found in bucket ${{ env.GIT_CACHE_BUCKET_NAME }}"
echo "GIT_CACHE_RESTORED=true" >> $GITHUB_ENV
aws s3 cp s3://${{ env.GIT_CACHE_BUCKET_NAME }}/$GIT_CACHE_FILENAME $GIT_CACHE_FILENAME --quiet
echo "Downloaded ${GIT_CACHE_FILENAME}"
tar --use-compress-program=pigz -xf $GIT_CACHE_FILENAME
echo "Uncompressed ${GIT_CACHE_FILENAME}"
rm $GIT_CACHE_FILENAME
fi

- name: GClient sync
run: |
gclient config --name "src/electron" --unmanaged git@github.com:${{ github.repository }}.git
gclient sync --with_branch_heads --with_tags

# TEMP if you don't do gsync
# cd src/electron
# gclient sync -f

- name: Save git-cache cache if needed
if: env.GIT_CACHE_RESTORED == 'false'
run: |
tar --use-compress-program=pigz -cf $GIT_CACHE_FILENAME ./$GIT_CACHE_FOLDER_NAME
aws s3 cp $GIT_CACHE_FILENAME s3://${{ env.GIT_CACHE_BUCKET_NAME }}/$GIT_CACHE_FILENAME --storage-class ONEZONE_IA --quiet

- name: Create source tarball and copy to artifacts bucket
if: inputs.build_type == 'release'
run: |
mkdir -p ${{ env.RELEASE_SRC_FOLDER }}

echo "Fetching chromium build tools to get export_tarball.py"
git clone https://chromium.googlesource.com/chromium/tools/build --depth 1

echo "Running export_tarball.py"
./build/recipes/recipe_modules/chromium/resources/export_tarball.py $RELEASE_SRC_FOLDER/${{ env.SOURCE_RELEASE_FILE_NAME }} --basename src --src-dir=./src --version=${{ env.ELECTRON_VERSION }} --remove-nonessential-files

echo "Uploading source tarball"
aws s3 cp ${{ env.RELEASE_SRC_FOLDER }}/${{ env.SOURCE_RELEASE_FILE_NAME }}.tar.xz s3://${{ env.ARTIFACT_BUCKET_NAME }}/${{ env.RELEASE_DST_FOLDER }}/ --acl public-read --quiet

- name: Set CHROMIUM_BUILDTOOLS_PATH env var
run: echo 'CHROMIUM_BUILDTOOLS_PATH='"$PWD"'/src/buildtools' >> $GITHUB_ENV

- name: Make sure electron git pack-refs file is present
# This is to stop ninja getting into an infinte loop of "[0/1] Regenerating ninja files"
# Found this file was the issue (as it was missing for some reason) by manually running ninja with -d explain
run: |
cd src/electron
git pack-refs --all

- name: Run GN Gen
run: |
cd src
gn gen $OUTPUT_FOLDER --args="import(\"${GN_IMPORT}\") cc_wrapper=\"sccache\""

- name: Run Ninja Build
run: |
cd src
ninja -C $OUTPUT_FOLDER electron

- name: Build other items for tests
if: inputs.build_type == 'test'
run: |
cd src
ninja -C $OUTPUT_FOLDER electron:node_headers shell_browser_ui_unittests

- name: Display sccache stats
run: sccache -s

- name: Run unit tests
if: inputs.build_type == 'test'
run: |
cd src/electron
xvfb-run node script/spec-runner --disable-gpu

- name: Run Node.js Smoke Tests
if: inputs.build_type == 'test'
run: |
cd src/electron
xvfb-run node script/node-spec-runner.js --default

- name: Prepare release dist and upload
if: inputs.build_type == 'release'
run: |
cd src
ninja -C $OUTPUT_FOLDER electron:electron_dist_zip electron:node_headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip
if [ "`uname`" == "Darwin" ]; then
target_os=mac
target_cpu=x64
if [ x"$MAS_BUILD" == x"true" ]; then
target_os=mac_mas
fi
if [ "$TARGET_ARCH" == "arm64" ]; then
target_cpu=arm64
fi
elif [ "`uname`" == "Linux" ]; then
target_os=linux
if [ x"$TARGET_ARCH" == x ]; then
target_cpu=x64
else
target_cpu="$TARGET_ARCH"
fi
else
echo "Unknown system: `uname`"
exit 1
fi
echo "Checking dist_zip.${target_os}.${target_cpu}.manifest"
echo "TARGET_OS_CPU=${target_os}-${target_cpu}" >> $GITHUB_ENV
electron/script/zip_manifests/check-zip-manifest.py $OUTPUT_FOLDER/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest

- name: Prepare release package and upload to artifacts bucket
if: inputs.build_type == 'release'
run: |
cd ${{ env.RELEASE_SRC_FOLDER }}
mkdir package
cd package
unzip -q ../../src/out/Release/dist.zip -d ./dist
cp ../../src/electron/npm/* .
cp ../../src/electron/electron.d.ts .
cp ../../src/LICENSE .

# Normally when electron is installed it will run install.js which will download the binary, create path.txt
# and copy fields 'name', 'repository', 'description', 'license', 'author', 'keywords' from the root package.json.

# We will manually do these steps and clear install.js

echo -n "electron" > path.txt
echo "" > install.js

echo "$(jq '. += {"name": "electron"}' package.json)" > package.json
echo "$(jq '. += {"repository": "https://github.com/brightsign/electron"}' package.json)" > package.json
echo "$(jq '. += {"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS"}' package.json)" > package.json
echo "$(jq '. += {"license": "MIT"}' package.json)" > package.json
echo "$(jq '. += {"author": "Electron Community"}' package.json)" > package.json
echo "$(jq '. += {"keywords": [ "electron" ] }' package.json)" > package.json
echo "$(jq '. += {"version": "${{ env.ELECTRON_VERSION }}"}' package.json)" > package.json

electron_package_name="electron-package-${{ env.TARGET_OS_CPU }}-${{ env.SOURCE_RELEASE_FILE_NAME }}.tar.gz"
echo "Creating $electron_package_name"
tar --use-compress-program=pigz -cf "../$electron_package_name" .
cd ..

echo "Uploading $electron_package_name to s3://${{ env.ARTIFACT_BUCKET_NAME }}/${{ env.RELEASE_DST_FOLDER }}/"
aws s3 cp $electron_package_name s3://${{ env.ARTIFACT_BUCKET_NAME }}/${{ env.RELEASE_DST_FOLDER }}/ --acl public-read --quiet
Loading
Loading