forked from CringeStudios/element-desktop
Add ability to insert extra config for windows builds.
This commit is contained in:
parent
1496f3d64c
commit
46e81cd8f8
8
.github/workflows/build_and_deploy.yaml
vendored
8
.github/workflows/build_and_deploy.yaml
vendored
@ -63,10 +63,18 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: [ia32, x64, arm64]
|
arch: [ia32, x64, arm64]
|
||||||
|
include:
|
||||||
|
- arch: ia32
|
||||||
|
extra_config: |-
|
||||||
|
"user_notice": {
|
||||||
|
"title": "Element will no longer be available for this platform soon",
|
||||||
|
"description": "Support for 32-bit Windows installations will be removed in the next release."
|
||||||
|
}
|
||||||
uses: ./.github/workflows/build_windows.yaml
|
uses: ./.github/workflows/build_windows.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
sign: true
|
sign: true
|
||||||
|
extra_config: ${{ matrix.extra_config }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
version: ${{ needs.prepare.outputs.nightly-version }}
|
version: ${{ needs.prepare.outputs.nightly-version }}
|
||||||
|
|
||||||
|
18
.github/workflows/build_windows.yaml
vendored
18
.github/workflows/build_windows.yaml
vendored
@ -22,6 +22,10 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: "The architecture to build for, one of 'x64' | 'ia32' | 'arm64'"
|
description: "The architecture to build for, one of 'x64' | 'ia32' | 'arm64'"
|
||||||
|
extra_config:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
description: "Additional configuration for config.json to be inserted for this build."
|
||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@ -105,6 +109,20 @@ jobs:
|
|||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
run: "yarn install --frozen-lockfile"
|
run: "yarn install --frozen-lockfile"
|
||||||
|
|
||||||
|
- name: Insert config snippet
|
||||||
|
if: inputs.extra_config != ''
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir config-edit
|
||||||
|
yarn asar extract webapp.asar config-edit
|
||||||
|
cd config-edit
|
||||||
|
mv config.json old-config.json
|
||||||
|
echo ${{ inputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json
|
||||||
|
rm old-config.json
|
||||||
|
rm webapp.asar
|
||||||
|
cd ..
|
||||||
|
yarn asar pack config-edit/ webpack.asar
|
||||||
|
|
||||||
- name: Set up sqlcipher macros
|
- name: Set up sqlcipher macros
|
||||||
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
|
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user