forked from CringeStudios/element-desktop
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
on: [push, workflow_dispatch]
|
|
|
|
jobs:
|
|
build-element:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download Cringe Studios configuration
|
|
run: "mkdir cringe && wget -O cringe/config.json https://chat.cringe-studios.com/config.json"
|
|
|
|
- name: Install dependencies
|
|
run: >
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash &&
|
|
source ~/.profile &&
|
|
\. "$HOME/.nvm/nvm.sh" &&
|
|
nvm install 22 &&
|
|
nvm use 22 &&
|
|
curl --proto "=https" -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn &&
|
|
dpkg --add-architecture i386 && apt-get update && apt-get install -y wine mono-devel rpm &&
|
|
ln -s /usr/bin/wine /usr/bin/wine64
|
|
|
|
- name: Install packages
|
|
run: >
|
|
source ~/.profile &&
|
|
\. "$HOME/.nvm/nvm.sh" &&
|
|
nvm use 22 &&
|
|
yarn add matrix-seshat &&
|
|
yarn
|
|
|
|
- name: Fetch element
|
|
run: >
|
|
source ~/.profile &&
|
|
\. "$HOME/.nvm/nvm.sh" &&
|
|
nvm use 22 &&
|
|
yarn run fetch --noverify --cfgdir cringe
|
|
|
|
- name: Build natives
|
|
run: >
|
|
source ~/.profile &&
|
|
\. "$HOME/.nvm/nvm.sh" &&
|
|
nvm use 22 &&
|
|
SQLCIPHER_BUNDLED=1 yarn run build:native
|
|
|
|
- name: Build packages
|
|
run: >
|
|
source ~/.profile &&
|
|
\. "$HOME/.nvm/nvm.sh" &&
|
|
nvm use 22 &&
|
|
yarn run build --linux rpm --linux deb --linux tar.xz --linux AppImage --win squirrel --publish never
|
|
|
|
- name: Copy artifacts to output directory
|
|
run: >
|
|
mkdir output &&
|
|
cp dist/element-desktop*.rpm dist/Element*.AppImage dist/element-desktop*.deb dist/element-desktop*.tar.xz dist/squirrel-windows/Element*.exe output/
|
|
|
|
#- name: Publish artifacts
|
|
# uses: christopherhx/gitea-upload-artifact@v4
|
|
# with:
|
|
# name: element-desktop
|
|
# path: |
|
|
# output/
|
|
|
|
- name: Publish artifacts via FTP
|
|
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
with:
|
|
server: ${{ secrets.FTP_SERVER }}
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
|
local-dir: ./output/
|
|
server-dir: ./artifacts/sekur-chat/
|
|
|