Files
element-desktop/.github/workflows/build_prepare.yaml
Nik Rozman 59ff331228
Some checks failed
Build Windows Package / fetch (push) Failing after 7m15s
Build Windows Package / fetch (pull_request) Failing after 5m33s
Pull Request / action (pull_request_target) Has been cancelled
Build Windows Package / setup (push) Has been cancelled
Build Windows Package / setup (pull_request) Has been cancelled
Build Windows Package / Windows Build (push) Has been cancelled
Build Windows Package / Windows Build (pull_request) Has been cancelled
Another attempt at fixing CI
2025-04-21 23:49:54 +02:00

77 lines
2.6 KiB
YAML

name: Prepare Build
on:
workflow_call:
inputs:
config:
type: string
required: true
description: "The config directory to use"
version:
type: string
required: false
description: "The version tag to fetch, or 'develop', will pick automatically if not passed"
outputs:
packages-dir:
description: "The directory non-deb packages for this run should live in"
value: "desktop"
deploy:
description: "Whether the build should be deployed to production"
value: false
permissions: {}
jobs:
prepare:
name: Prepare
runs-on: windows-gp
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libnss3-dev
- name: Install Yarn
run: npm install -g yarn
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: Clone Element Web
run: |
git clone https://git.piskot.si/nikrozman/element-web.git element-web
cd element-web
yarn install --frozen-lockfile
yarn build
cd ..
yarn run asar pack element-web/webapp webapp.asar
- name: Generate cache hash files
run: |
# Save electron version
NODE_ENV=production node -e "console.log(require('./package.json').devDependencies.electron)" > electronVersion
# Generate hak dependencies hash
jq -c .hakDependencies package.json | sha1sum > hakHash
if [ -d "hak" ]; then
find hak -type f -print0 | sort -z | xargs -0 sha1sum >> hakHash
fi
if [ -d "scripts/hak" ]; then
find scripts/hak -type f -print0 | sort -z | xargs -0 sha1sum >> hakHash
fi
- uses: ChristopherHX/gitea-upload-artifact@v4
with:
name: webapp
retention-days: 1
path: |
webapp.asar
package.json
electronVersion
hakHash