Skip to content

Commit e20d0ad

Browse files
authored
Merge branch 'develop' into Allow-MSC4039-For-Element-Call
2 parents f8235b8 + 0d1d889 commit e20d0ad

455 files changed

Lines changed: 1575 additions & 1089 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
persist-credentials: false
4949

50-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
50+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
5151
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
5252
with:
5353
# Disable cache on Windows as it is slower than not caching

.github/workflows/build_desktop_and_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
persist-credentials: false
5959

60-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
60+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
6161
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6262
with:
6363
cache: "pnpm"

.github/workflows/build_desktop_linux.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
# https://github.com/matrix-org/seshat/issues/135
7474
runs-on: ${{ inputs.runs-on || (inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04') }}
7575
env:
76-
HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-desktop-dockerbuild
76+
HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-web/desktop-build-env
7777
steps:
7878
- name: Resolve docker image tag for push
7979
if: github.event_name == 'push'
@@ -118,13 +118,13 @@ jobs:
118118

119119
- name: Cache .hak
120120
id: cache
121-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
121+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
122122
with:
123123
key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
124124
path: |
125125
apps/desktop/.hak
126126
127-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
127+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
128128
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
129129
with:
130130
node-version-file: apps/desktop/.node-version

.github/workflows/build_desktop_macos.yaml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
runs-on: macos-15 # M1
7474
environment: ${{ inputs.sign && 'Desktop Apple' || '' }}
7575
steps:
76-
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1
76+
- uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
7777
with:
7878
xcode-version: latest-stable
7979

@@ -90,7 +90,7 @@ jobs:
9090

9191
- name: Cache .hak
9292
id: cache
93-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
93+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
9494
with:
9595
key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }}
9696
path: |
@@ -113,7 +113,7 @@ jobs:
113113
# https://github.com/electron-userland/electron-builder/issues/9511#issuecomment-3774092888
114114
- run: sudo pip3 install pyobjc-framework-Quartz
115115

116-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
116+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
117117
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
118118
with:
119119
node-version-file: apps/desktop/.node-version
@@ -128,22 +128,21 @@ jobs:
128128
working-directory: apps/desktop
129129
run: pnpm run build:native:universal
130130

131-
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
132-
- name: "[Signed] Build App"
133-
if: inputs.sign != ''
131+
- name: "Build App"
134132
working-directory: apps/desktop
135-
run: |
136-
pnpm run build:universal --publish never -m ${TARGETS}
133+
run: pnpm run build:universal --publish never -m ${TARGETS}
137134
env:
138-
APPLE_TEAM_ID: ${{ vars.APPLE_TEAM_ID }}
139-
APPLE_ID: ${{ secrets.APPLE_ID }}
140-
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
141-
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
142-
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
135+
# Code signing parameters
136+
CSC_IDENTITY_AUTO_DISCOVERY: ${{ inputs.sign != '' }}
137+
APPLE_TEAM_ID: ${{ case(inputs.sign != '', vars.APPLE_TEAM_ID, '') }}
138+
APPLE_ID: ${{ case(inputs.sign != '', secrets.APPLE_ID, '') }}
139+
APPLE_APP_SPECIFIC_PASSWORD: ${{ case(inputs.sign != '', secrets.APPLE_ID_PASSWORD, '') }}
140+
CSC_KEY_PASSWORD: ${{ case(inputs.sign != '', secrets.APPLE_CSC_KEY_PASSWORD, '') }}
141+
CSC_LINK: ${{ case(inputs.sign != '', secrets.APPLE_CSC_LINK, '') }}
143142
VARIANT_PATH: variant.json
143+
TARGETS: ${{ inputs.targets }}
144144
# Only set for Nightly builds
145145
VERSION: ${{ inputs.version }}
146-
TARGETS: ${{ inputs.targets }}
147146

148147
- name: Check app was signed & notarised successfully
149148
if: inputs.sign != ''
@@ -154,16 +153,6 @@ jobs:
154153
spctl -a -vvv -t install /Volumes/Element/*.app
155154
hdiutil detach /Volumes/Element
156155
157-
- name: "[Unsigned] Build App"
158-
if: inputs.sign == ''
159-
working-directory: apps/desktop
160-
run: |
161-
pnpm run build:universal --publish never -m ${TARGETS}
162-
env:
163-
CSC_IDENTITY_AUTO_DISCOVERY: false
164-
VARIANT_PATH: variant.json
165-
TARGETS: ${{ inputs.targets }}
166-
167156
- name: Generate releases.json
168157
if: inputs.base-url
169158
working-directory: apps/desktop

.github/workflows/build_desktop_prepare.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
with:
5959
persist-credentials: false
6060

61-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
61+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
6262
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6363
with:
6464
node-version-file: apps/desktop/.node-version

.github/workflows/build_desktop_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-web' || github.repository }}
4242
persist-credentials: false
4343

44-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
44+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
4545
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4646
with:
4747
node-version-file: apps/desktop/.node-version

.github/workflows/build_desktop_windows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121

122122
- name: Cache .hak
123123
id: cache
124-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
124+
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
125125
with:
126126
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
127127
path: |
@@ -152,7 +152,7 @@ jobs:
152152
env:
153153
TARGET: ${{ steps.config.outputs.target }}
154154

155-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
155+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
156156
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
157157
with:
158158
node-version-file: apps/desktop/.node-version

.github/workflows/build_develop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
persist-credentials: false
3434

35-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
35+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
3636
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
3737
with:
3838
cache: "pnpm"

.github/workflows/cd.yaml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: CD # Continuous Delivery
22
on:
33
push:
4-
branches: [develop]
4+
branches: [master, staging, develop]
55
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
66

77
permissions: {}
88
env:
9-
NX_DEFAULT_OUTPUT_STYLE: static
9+
NX_DEFAULT_OUTPUT_STYLE: stream-without-prefixes
1010

1111
jobs:
1212
docker:
@@ -21,18 +21,8 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2323
with:
24-
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
25-
fetch-depth: 0
26-
# reduce the size of the checkout with tree filtering,
27-
# see https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/
28-
filter: tree:0
2924
persist-credentials: false
3025

31-
- name: Prepare nx
32-
uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4
33-
with:
34-
main-branch-name: develop
35-
3626
- name: Install Cosign
3727
uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3
3828

@@ -43,7 +33,7 @@ jobs:
4333
id: builder
4434
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
4535

46-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
36+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
4737
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4838
with:
4939
node-version-file: package.json
@@ -59,21 +49,20 @@ jobs:
5949
username: ${{ github.repository_owner }}
6050
password: ${{ secrets.GITHUB_TOKEN }}
6151

62-
- run: pnpm nx affected -t docker:build
52+
- run: pnpm nx run-many --nxBail -t docker:build
53+
id: build
6354
env:
6455
INPUT_PUSH: true
6556
INPUT_LOAD: false
6657
INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6758
INPUT_BUILDER: ${{ steps.builder.outputs.name }}
6859

6960
- name: Sign the images with GitHub OIDC token
70-
env:
71-
PATTERN: "^ghcr.io/element-hq/element-web*"
7261
run: |
73-
docker image ls --digests --format '{{.Repository}}@{{.Digest}}' | grep "$PATTERN" | while read -r TARGET; do
74-
# Check if digest is valid (not <none>)
75-
if [[ "$TARGET" != *"@<none>"* ]]; then
62+
shopt -s globstar
63+
64+
for FILE in ./node_modules/.cache/nx-container/**/metadata; do
65+
TARGET=$(jq -r '(.["image.name"] | split(",") | last) + "@" + .["containerimage.digest"]' "$FILE")
7666
echo "Signing $TARGET..."
7767
cosign sign --yes "$TARGET"
78-
fi
7968
done

.github/workflows/dockerbuild.yaml

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)