Combine remaining workflows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2026-03-24 14:36:56 +00:00
parent 4d72aa22e3
commit 8b8539d941
13 changed files with 87 additions and 140 deletions
@@ -44,7 +44,7 @@ env:
permissions: {} # Uses ELEMENT_BOT_TOKEN permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
prepare: prepare:
uses: ./.github/workflows/build_prepare.yaml uses: ./.github/workflows/build_desktop_prepare.yaml
permissions: permissions:
contents: read contents: read
with: with:
@@ -9,7 +9,7 @@ concurrency:
permissions: {} # No permissions required permissions: {} # No permissions required
jobs: jobs:
fetch: fetch:
uses: ./.github/workflows/build_prepare.yaml uses: ./.github/workflows/build_desktop_prepare.yaml
permissions: permissions:
contents: read contents: read
with: with:
@@ -33,7 +33,7 @@ on:
+ webapp.asar - the asar archive of the webapp to embed in the desktop app + webapp.asar - the asar archive of the webapp to embed in the desktop app
+ electronVersion - the version of electron to use for cache keying + electronVersion - the version of electron to use for cache keying
+ hakHash - the hash of the .hak directory to use for cache keying + hakHash - the hash of the .hak directory to use for cache keying
+ changelog.Debian - the changelog file to embed in the Debian package + changelog.Debian - the changelog file to embed in the Debian package
+ variant.json - the variant configuration to use for the build + variant.json - the variant configuration to use for the build
The artifact can also contain any additional files which will be applied as overrides to the checkout root before building, The artifact can also contain any additional files which will be applied as overrides to the checkout root before building,
@@ -107,13 +107,14 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
repository: element-hq/element-desktop repository: element-hq/element-web
ref: ${{ inputs.ref }} ref: ${{ inputs.ref }}
persist-credentials: false persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with: with:
name: ${{ inputs.prepare-artifact-name }} name: ${{ inputs.prepare-artifact-name }}
path: apps/desktop
- name: Cache .hak - name: Cache .hak
id: cache id: cache
@@ -121,34 +122,36 @@ jobs:
with: with:
key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }} key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
path: | path: |
./.hak apps/desktop/.hak
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version-file: .node-version node-version-file: apps/desktop/.node-version
cache: "pnpm" cache: "pnpm"
env: env:
# Workaround for https://github.com/actions/setup-node/issues/317 # Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0 FORCE_COLOR: 0
- name: Install Deps - name: Install Deps
working-directory: apps/desktop
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: "Get modified files" - name: "Get modified files"
id: changed_files id: changed_files
if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request' && github.repository == 'element-hq/element-desktop' if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request' && github.repository == 'element-hq/element-web'
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46 uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46
with: with:
files: | files: |
dockerbuild/** apps/desktop/dockerbuild/**
# This allows contributors to test changes to the dockerbuild image within a pull request # This allows contributors to test changes to the dockerbuild image within a pull request
- name: Build docker image - name: Build docker image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7 uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
if: steps.changed_files.outputs.any_modified == 'true' if: steps.changed_files.outputs.any_modified == 'true'
with: with:
file: dockerbuild/Dockerfile file: apps/desktop/dockerbuild/Dockerfile
context: apps/desktop
load: true load: true
platforms: linux/${{ inputs.arch }} platforms: linux/${{ inputs.arch }}
tags: ${{ env.HAK_DOCKER_IMAGE }} tags: ${{ env.HAK_DOCKER_IMAGE }}
@@ -157,13 +160,14 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: | run: |
docker run \ docker run \
-v ${{ github.workspace }}:/work -w /work \ -v ${{ github.workspace }}/apps/desktop:/work -w /work \
-e SQLCIPHER_BUNDLED \ -e SQLCIPHER_BUNDLED \
-e CI=1 \ -e CI=1 \
$HAK_DOCKER_IMAGE \ $HAK_DOCKER_IMAGE \
pnpm build:native pnpm build:native
- name: Fix permissions - name: Fix permissions
working-directory: apps/desktop
run: | run: |
# For .hak # For .hak
sudo chown -R $USER:$USER .hak sudo chown -R $USER:$USER .hak
@@ -171,6 +175,7 @@ jobs:
sudo chmod +x node_modules/7zip-bin/linux/*/7za sudo chmod +x node_modules/7zip-bin/linux/*/7za
- name: Check native libraries in hak dependencies - name: Check native libraries in hak dependencies
working-directory: apps/desktop
run: | run: |
shopt -s globstar shopt -s globstar
@@ -179,12 +184,14 @@ jobs:
done done
- name: Generate debian files and arguments - name: Generate debian files and arguments
working-directory: apps/desktop
run: | run: |
if [ -f changelog.Debian ]; then if [ -f changelog.Debian ]; then
echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV
fi fi
- name: Build App - name: Build App
working-directory: apps/desktop
run: pnpm build --publish never $BUILD_ARGS -l $TARGETS run: pnpm build --publish never $BUILD_ARGS -l $TARGETS
env: env:
VARIANT_PATH: variant.json VARIANT_PATH: variant.json
@@ -196,6 +203,7 @@ jobs:
TARGETS: ${{ inputs.targets }} TARGETS: ${{ inputs.targets }}
- name: Check native libraries - name: Check native libraries
working-directory: apps/desktop
run: | run: |
set -x set -x
shopt -s globstar shopt -s globstar
@@ -227,12 +235,13 @@ jobs:
with: with:
name: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }} name: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
path: | path: |
dist apps/desktop/dist
!dist/*-unpacked/** !apps/desktop/dist/*-unpacked/**
retention-days: 1 retention-days: 1
- name: Assert deb is present and valid - name: Assert deb is present and valid
if: contains(inputs.targets, 'deb') if: contains(inputs.targets, 'deb')
working-directory: apps/desktop
run: | run: |
test -f ./dist/element-desktop*$ARCH.deb test -f ./dist/element-desktop*$ARCH.deb
@@ -245,6 +254,7 @@ jobs:
- name: Assert tar.gz is present - name: Assert tar.gz is present
if: contains(inputs.targets, 'tar.gz') if: contains(inputs.targets, 'tar.gz')
working-directory: apps/desktop
run: | run: |
test -f ./dist/element-desktop*.tar.gz test -f ./dist/element-desktop*.tar.gz
@@ -257,7 +267,7 @@ jobs:
name: Test Linux ${{ inputs.arch }} SQLCipher ${{ inputs.sqlcipher }} name: Test Linux ${{ inputs.arch }} SQLCipher ${{ inputs.sqlcipher }}
needs: build needs: build
if: inputs.test && contains(inputs.targets, 'deb') if: inputs.test && contains(inputs.targets, 'deb')
uses: ./.github/workflows/build_test.yaml uses: ./.github/workflows/build_desktop_test.yaml
with: with:
project: linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }} project: linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
artifact: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }} artifact: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
@@ -81,13 +81,14 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
repository: element-hq/element-desktop repository: element-hq/element-web
ref: ${{ inputs.ref }} ref: ${{ inputs.ref }}
persist-credentials: false persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with: with:
name: ${{ inputs.prepare-artifact-name }} name: ${{ inputs.prepare-artifact-name }}
path: apps/desktop
- name: Cache .hak - name: Cache .hak
id: cache id: cache
@@ -95,7 +96,7 @@ jobs:
with: with:
key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }} key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: | path: |
./.hak apps/desktop/.hak
- name: Install Rust - name: Install Rust
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
@@ -117,19 +118,22 @@ jobs:
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version-file: .node-version node-version-file: apps/desktop/.node-version
cache: "pnpm" cache: "pnpm"
- name: Install Deps - name: Install Deps
working-directory: apps/desktop
run: "pnpm install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Build Natives - name: Build Natives
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop
run: pnpm build:native:universal run: pnpm build:native:universal
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string # We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
- name: "[Signed] Build App" - name: "[Signed] Build App"
if: inputs.sign != '' if: inputs.sign != ''
working-directory: apps/desktop
run: | run: |
pnpm build:universal --publish never -m ${TARGETS} pnpm build:universal --publish never -m ${TARGETS}
env: env:
@@ -145,6 +149,7 @@ jobs:
- name: Check app was signed & notarised successfully - name: Check app was signed & notarised successfully
if: inputs.sign != '' if: inputs.sign != ''
working-directory: apps/desktop
run: | run: |
hdiutil attach dist/*.dmg -mountpoint /Volumes/Element hdiutil attach dist/*.dmg -mountpoint /Volumes/Element
codesign -dv --verbose=4 /Volumes/Element/*.app codesign -dv --verbose=4 /Volumes/Element/*.app
@@ -153,6 +158,7 @@ jobs:
- name: "[Unsigned] Build App" - name: "[Unsigned] Build App"
if: inputs.sign == '' if: inputs.sign == ''
working-directory: apps/desktop
run: | run: |
pnpm build:universal --publish never -m ${TARGETS} pnpm build:universal --publish never -m ${TARGETS}
env: env:
@@ -162,6 +168,7 @@ jobs:
- name: Generate releases.json - name: Generate releases.json
if: inputs.base-url if: inputs.base-url
working-directory: apps/desktop
run: | run: |
PKG_JSON_VERSION=$(cat package.json | jq -r .version) PKG_JSON_VERSION=$(cat package.json | jq -r .version)
LATEST=$(find dist -type f -iname "*-mac.zip" | xargs -0 -n1 -- basename) LATEST=$(find dist -type f -iname "*-mac.zip" | xargs -0 -n1 -- basename)
@@ -193,17 +200,19 @@ jobs:
with: with:
name: ${{ inputs.artifact-prefix }}macos name: ${{ inputs.artifact-prefix }}macos
path: | path: |
dist apps/desktop/dist
!dist/mac-universal/** !apps/desktop/dist/mac-universal/**
retention-days: 1 retention-days: 1
- name: Assert zip is present - name: Assert zip is present
if: contains(inputs.targets, 'zip') if: contains(inputs.targets, 'zip')
working-directory: apps/desktop
run: | run: |
test -f ./dist/Element*-mac.zip test -f ./dist/Element*-mac.zip
- name: Assert dmg is present - name: Assert dmg is present
if: contains(inputs.targets, 'dmg') if: contains(inputs.targets, 'dmg')
working-directory: apps/desktop
run: | run: |
test -f ./dist/Element*.dmg test -f ./dist/Element*.dmg
@@ -211,7 +220,7 @@ jobs:
name: Test macOS Universal name: Test macOS Universal
needs: build needs: build
if: inputs.test && contains(inputs.targets, 'dmg') if: inputs.test && contains(inputs.targets, 'dmg')
uses: ./.github/workflows/build_test.yaml uses: ./.github/workflows/build_desktop_test.yaml
with: with:
project: macos project: macos
artifact: ${{ inputs.artifact-prefix }}macos artifact: ${{ inputs.artifact-prefix }}macos
@@ -61,15 +61,17 @@ jobs:
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version-file: .node-version node-version-file: apps/desktop/.node-version
cache: "pnpm" cache: "pnpm"
- name: Install Deps - name: Install Deps
working-directory: apps/desktop
run: "pnpm install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Fetch Element Web (matching branch) - name: Fetch Element Web (matching branch)
id: branch-matching id: branch-matching
if: inputs.branch-matching if: inputs.branch-matching
working-directory: apps/desktop
continue-on-error: true continue-on-error: true
run: | run: |
scripts/branch-match.sh scripts/branch-match.sh
@@ -86,18 +88,21 @@ jobs:
- name: Fetch Element Web (${{ inputs.version }}) - name: Fetch Element Web (${{ inputs.version }})
if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped' if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped'
working-directory: apps/desktop
run: pnpm run fetch --noverify -d ${CONFIG} ${VERSION} run: pnpm run fetch --noverify -d ${CONFIG} ${VERSION}
env: env:
CONFIG: ${{ inputs.config }} CONFIG: ${{ inputs.config }}
VERSION: ${{ inputs.version }} VERSION: ${{ inputs.version }}
- name: Copy variant config - name: Copy variant config
working-directory: apps/desktop
run: cp "$CONFIG_DIR/build.json" variant.json run: cp "$CONFIG_DIR/build.json" variant.json
env: env:
CONFIG_DIR: ${{ inputs.config }} CONFIG_DIR: ${{ inputs.config }}
# We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action # We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action
- name: Generate cache hash files - name: Generate cache hash files
working-directory: apps/desktop
run: | run: |
set -ex set -ex
# Add --no-sandbox as otherwise it fails because the helper isn't setuid root. It's only getting the version. # Add --no-sandbox as otherwise it fails because the helper isn't setuid root. It's only getting the version.
@@ -130,6 +135,7 @@ jobs:
- name: Check version - name: Check version
id: package id: package
working-directory: apps/desktop
run: | run: |
echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
@@ -144,6 +150,7 @@ jobs:
- name: "[Release] Write changelog" - name: "[Release] Write changelog"
if: ${{ !inputs.nightly && inputs.version != 'develop' }} if: ${{ !inputs.nightly && inputs.version != 'develop' }}
working-directory: apps/desktop
run: | run: |
TIME=$(date -d "$PUBLISHED_AT" -R) TIME=$(date -d "$PUBLISHED_AT" -R)
echo "element-desktop ($VERSION) default; urgency=medium" >> changelog.Debian echo "element-desktop ($VERSION) default; urgency=medium" >> changelog.Debian
@@ -158,6 +165,7 @@ jobs:
- name: "[Nightly] Write summary" - name: "[Nightly] Write summary"
if: inputs.nightly if: inputs.nightly
working-directory: apps/desktop
run: | run: |
BUNDLE_HASH=$(npx asar l webapp.asar | grep /bundles/ | head -n 1 | sed 's|.*/||') BUNDLE_HASH=$(npx asar l webapp.asar | grep /bundles/ | head -n 1 | sed 's|.*/||')
WEBAPP_VERSION=$(./scripts/get-version.ts) WEBAPP_VERSION=$(./scripts/get-version.ts)
@@ -179,8 +187,8 @@ jobs:
name: webapp name: webapp
retention-days: 1 retention-days: 1
path: | path: |
webapp.asar apps/desktop/webapp.asar
electronVersion apps/desktop/electronVersion
hakHash apps/desktop/hakHash
changelog.Debian apps/desktop/changelog.Debian
variant.json apps/desktop/variant.json
@@ -38,24 +38,26 @@ jobs:
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }} repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-web' || github.repository }}
persist-credentials: false persist-credentials: false
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version-file: .node-version node-version-file: apps/desktop/.node-version
cache: "pnpm" cache: "pnpm"
- name: Install Deps - name: Install Deps
working-directory: apps/desktop
run: "pnpm install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with: with:
name: ${{ inputs.artifact }} name: ${{ inputs.artifact }}
path: dist path: apps/desktop/dist
- name: Prepare for tests - name: Prepare for tests
working-directory: apps/desktop
# This is set by the caller of the reusable workflow, they have the ability to run the command they specify # This is set by the caller of the reusable workflow, they have the ability to run the command they specify
# directly without our help so this is fine. # directly without our help so this is fine.
run: ${{ inputs.prepare_cmd }} # zizmor: ignore[template-injection] run: ${{ inputs.prepare_cmd }} # zizmor: ignore[template-injection]
@@ -63,6 +65,7 @@ jobs:
- name: Expand executable path - name: Expand executable path
id: executable id: executable
working-directory: apps/desktop
shell: bash shell: bash
env: env:
EXECUTABLE: ${{ inputs.executable }} EXECUTABLE: ${{ inputs.executable }}
@@ -84,7 +87,7 @@ jobs:
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
timeout-minutes: 20 timeout-minutes: 20
with: with:
run: pnpm test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }} run: pnpm -C apps/desktop test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
env: env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }} ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}
@@ -93,7 +96,7 @@ jobs:
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with: with:
name: blob-report-${{ inputs.artifact }} name: blob-report-${{ inputs.artifact }}
path: blob-report path: apps/desktop/blob-report
retention-days: 1 retention-days: 1
- name: Upload HTML report - name: Upload HTML report
@@ -101,5 +104,5 @@ jobs:
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
with: with:
name: ${{ inputs.artifact }}-test name: ${{ inputs.artifact }}-test
path: playwright-report path: apps/desktop/playwright-report
retention-days: 14 retention-days: 14
@@ -110,13 +110,14 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
repository: element-hq/element-desktop repository: element-hq/element-web
ref: ${{ inputs.ref }} ref: ${{ inputs.ref }}
persist-credentials: false persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with: with:
name: ${{ inputs.prepare-artifact-name }} name: ${{ inputs.prepare-artifact-name }}
path: apps/desktop/
- name: Cache .hak - name: Cache .hak
id: cache id: cache
@@ -124,7 +125,7 @@ jobs:
with: with:
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }} key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: | path: |
./.hak apps/desktop/.hak
# ActiveTCL package on choco is from 2015, # ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need # this one is newer but includes more than we need
@@ -154,14 +155,16 @@ jobs:
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version-file: .node-version node-version-file: apps/desktop/.node-version
cache: "pnpm" cache: "pnpm"
- name: Install Deps - name: Install Deps
working-directory: apps/desktop
run: "pnpm install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Insert config snippet - name: Insert config snippet
if: steps.config.outputs.extra_config != '' if: steps.config.outputs.extra_config != ''
working-directory: apps/desktop
shell: bash shell: bash
run: | run: |
mkdir config-edit mkdir config-edit
@@ -188,6 +191,7 @@ jobs:
- name: Build Natives - name: Build Natives
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop
run: | run: |
refreshenv refreshenv
pnpm build:native --target $env:TARGET pnpm build:native --target $env:TARGET
@@ -239,6 +243,7 @@ jobs:
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
- name: Build App - name: Build App
working-directory: apps/desktop
run: pnpm build --publish never $BUILD_ARGS -w $TARGETS run: pnpm build --publish never $BUILD_ARGS -w $TARGETS
shell: bash shell: bash
env: env:
@@ -260,6 +265,7 @@ jobs:
Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath .github/SSLcom-sandbox.crt Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath .github/SSLcom-sandbox.crt
- name: Check app was signed successfully - name: Check app was signed successfully
working-directory: apps/desktop
run: | run: |
Set-StrictMode -Version 'Latest' Set-StrictMode -Version 'Latest'
Get-ChildItem ` Get-ChildItem `
@@ -272,15 +278,17 @@ jobs:
with: with:
name: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }} name: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }}
path: | path: |
dist apps/desktop/dist
retention-days: 1 retention-days: 1
- name: Assert executable is present - name: Assert executable is present
working-directory: apps/desktop
run: | run: |
Test-Path './dist/win-*unpacked/Element*.exe' Test-Path './dist/win-*unpacked/Element*.exe'
- name: Assert all Squirrel files are present - name: Assert all Squirrel files are present
if: contains(inputs.targets, 'squirrel') if: contains(inputs.targets, 'squirrel')
working-directory: apps/desktop
run: | run: |
Test-Path './dist/squirrel-windows*/Element Setup*.exe' Test-Path './dist/squirrel-windows*/Element Setup*.exe'
Test-Path './dist/squirrel-windows*/element-desktop-*-full.nupkg' Test-Path './dist/squirrel-windows*/element-desktop-*-full.nupkg'
@@ -288,6 +296,7 @@ jobs:
- name: Assert MSI is present - name: Assert MSI is present
if: contains(inputs.targets, 'msi') if: contains(inputs.targets, 'msi')
working-directory: apps/desktop
run: | run: |
Test-Path './dist/Element*.msi' Test-Path './dist/Element*.msi'
@@ -295,7 +304,7 @@ jobs:
name: Test Windows ${{ inputs.arch }} name: Test Windows ${{ inputs.arch }}
needs: build needs: build
if: inputs.test if: inputs.test
uses: ./.github/workflows/build_test.yaml uses: ./.github/workflows/build_desktop_test.yaml
with: with:
project: win-${{ inputs.arch }} project: win-${{ inputs.arch }}
artifact: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }} artifact: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }}
+1 -11
View File
@@ -16,13 +16,6 @@ jobs:
name: GitHub Pages name: GitHub Pages
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- name: Fetch element-desktop
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
repository: element-hq/element-desktop
path: element-desktop
persist-credentials: false
- name: Fetch element-web - name: Fetch element-web
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with: with:
@@ -49,7 +42,7 @@ jobs:
working-directory: element-web working-directory: element-web
run: | run: |
pnpm install --frozen-lockfile pnpm install --frozen-lockfile
pnpm node ./scripts/gen-workflow-mermaid.ts ../element-desktop ../element-web ../matrix-js-sdk > docs/automations.md pnpm node ./scripts/gen-workflow-mermaid.ts ../element-web ../matrix-js-sdk > docs/automations.md
echo "- [Automations](automations.md)" >> docs/SUMMARY.md echo "- [Automations](automations.md)" >> docs/SUMMARY.md
- name: Setup mdBook - name: Setup mdBook
@@ -64,9 +57,6 @@ jobs:
run: | run: |
mkdir docs mkdir docs
mv element-desktop/README.md element-desktop/docs/
mv element-desktop/docs "docs/Element Desktop"
mv element-web/README.md element-web/docs/ mv element-web/README.md element-web/docs/
mv element-web/docs/lib docs/ mv element-web/docs/lib docs/
mv element-web/docs "docs/Element Web" mv element-web/docs "docs/Element Web"
+10 -14
View File
@@ -29,22 +29,9 @@ jobs:
gpg-fingerprint: ${{ vars.GPG_FINGERPRINT }} gpg-fingerprint: ${{ vars.GPG_FINGERPRINT }}
asset-path: dist/*.tar.gz asset-path: dist/*.tar.gz
expected-asset-count: 3 expected-asset-count: 3
# Desktop has no dist script so we only target web here
dir: apps/web dir: apps/web
notify-downstream:
name: Trigger release drafter downstream
needs: release
runs-on: ubuntu-24.04
steps:
- name: Notify element-desktop repo that element-web release has completed to re-trigger release-drafter
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
with:
workflow: release-drafter.yml
repo: element-hq/element-desktop
ref: staging
# Required when using the `repo` option. Either a PAT or a token generated from the GitHub app or CLI
token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
check: check:
name: Post release checks name: Post release checks
needs: release needs: release
@@ -69,3 +56,12 @@ jobs:
wait-interval: 10 wait-interval: 10
check-name: Build package check-name: Build package
allowed-conclusions: success allowed-conclusions: success
- name: Wait for desktop packaging
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
with:
ref: master
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: Prepare|Linux|macOS|Windows|Deploy|deploy
allowed-conclusions: success
+1 -33
View File
@@ -2,11 +2,6 @@ name: Cut branches
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
element-desktop:
description: Prepare element-desktop
required: true
type: boolean
default: true
element-web: element-web:
description: Prepare element-web description: Prepare element-web
required: true required: true
@@ -26,7 +21,6 @@ jobs:
repo: repo:
- matrix-org/matrix-js-sdk - matrix-org/matrix-js-sdk
- element-hq/element-web - element-hq/element-web
- element-hq/element-desktop
uses: matrix-org/matrix-js-sdk/.github/workflows/release-checks.yml@develop # zizmor: ignore[unpinned-uses] uses: matrix-org/matrix-js-sdk/.github/workflows/release-checks.yml@develop # zizmor: ignore[unpinned-uses]
secrets: secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
@@ -38,19 +32,8 @@ jobs:
needs: checks needs: checks
env: env:
# The order is specified bottom-up to avoid any races for allchange # The order is specified bottom-up to avoid any races for allchange
REPOS: matrix-js-sdk element-web element-desktop REPOS: matrix-js-sdk element-web
steps: steps:
- name: Checkout Element Desktop
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: inputs.element-desktop
with:
repository: element-hq/element-desktop
path: element-desktop
ref: staging
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
persist-credentials: true
- name: Checkout Element Web - name: Checkout Element Web
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: inputs.element-web if: inputs.element-web
@@ -79,10 +62,6 @@ jobs:
git config --global user.email "releases@riot.im" git config --global user.email "releases@riot.im"
git config --global user.name "RiotRobot" git config --global user.name "RiotRobot"
- name: Merge Element Desktop
if: inputs.element-desktop
run: |
git -C "element-desktop" merge origin/develop
- name: Merge Element Web - name: Merge Element Web
if: inputs.element-web if: inputs.element-web
run: | run: |
@@ -116,14 +95,3 @@ jobs:
wait-interval: 10 wait-interval: 10
check-name: "draft / draft" check-name: "draft / draft"
allowed-conclusions: success allowed-conclusions: success
- name: Wait for element-desktop draft
if: inputs.element-desktop
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
with:
ref: staging
repo: element-hq/element-desktop
repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
wait-interval: 10
check-name: "draft / draft"
allowed-conclusions: success
-46
View File
@@ -1,46 +0,0 @@
name: Release Process
on:
workflow_dispatch:
inputs:
mode:
description: What type of release
required: true
default: rc
type: choice
options:
- rc
- final
concurrency: ${{ github.workflow }}
permissions: {}
jobs:
release:
uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop # zizmor: ignore[unpinned-uses]
permissions:
contents: write
issues: write
pull-requests: read
id-token: write
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
with:
final: ${{ inputs.mode == 'final' }}
gpg-fingerprint: ${{ vars.GPG_FINGERPRINT }}
expected-asset-count: 1
check:
name: Post release checks
needs: release
runs-on: ubuntu-24.04
permissions:
checks: read
steps:
- name: Wait for desktop packaging
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
with:
ref: master
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: Prepare|Linux|macOS|Windows|Deploy|deploy
allowed-conclusions: success