Some checks failed
Build Windows Package / fetch (pull_request) Has been cancelled
Build Windows Package / setup (pull_request) Has been cancelled
Build Windows Package / Windows Build (pull_request) Has been cancelled
Pull Request / action (pull_request_target) Has been cancelled
Build Windows Package / setup (push) Has been cancelled
Build Windows Package / Windows Build (push) Has been cancelled
Build Windows Package / fetch (push) Has been cancelled
83 lines
2.9 KiB
YAML
83 lines
2.9 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
|
|
|
|
- name: Install and configure MinIO Client
|
|
env:
|
|
S3_AK: ${{ secrets.S3_AK }}
|
|
S3_SK: ${{ secrets.S3_SK }}
|
|
run: |
|
|
wget https://dl.min.io/client/mc/release/linux-amd64/mc
|
|
chmod +x mc
|
|
./mc alias set s3 https://s3.piskot.si $S3_AK $S3_SK
|
|
|
|
- name: Upload files to S3
|
|
run: |
|
|
./mc cp webapp.asar s3/element-desktop/staging/
|
|
./mc cp package.json s3/element-desktop/staging/
|
|
./mc cp electronVersion s3/element-desktop/staging/
|
|
./mc cp hakHash s3/element-desktop/staging/
|