2022-03-21 13:20:26 +03:00
|
|
|
name: Package-Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
Lint:
|
|
|
|
runs-on: macos-11
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Installing Node
|
2022-05-17 07:12:32 +03:00
|
|
|
uses: actions/setup-node@v3.2.0
|
2022-03-21 13:20:26 +03:00
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
npm i -g yarn@1.19.1
|
|
|
|
cd app
|
|
|
|
yarn
|
|
|
|
cd ..
|
|
|
|
rm app/node_modules/.yarn-integrity
|
|
|
|
yarn
|
|
|
|
|
|
|
|
- name: Build typings
|
|
|
|
run: yarn run build:typings
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: yarn run lint
|
|
|
|
|
|
|
|
macOS-Build:
|
|
|
|
runs-on: macos-11
|
|
|
|
needs: Lint
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- arch: x86_64
|
|
|
|
- arch: arm64
|
2022-06-18 22:11:07 +03:00
|
|
|
fail-fast: false
|
2022-09-04 18:59:48 +03:00
|
|
|
|
2022-03-21 13:20:26 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Installing Node
|
2022-05-17 07:12:32 +03:00
|
|
|
uses: actions/setup-node@v3.2.0
|
2022-03-21 13:20:26 +03:00
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
sudo npm i -g yarn@1.22.1
|
|
|
|
yarn --network-timeout 1000000
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
|
|
|
|
- name: Fix cross build
|
|
|
|
run: |
|
|
|
|
rm -rf app/node_modules/cpu-features
|
|
|
|
rm -rf app/node_modules/ssh2/crypto/build
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.arch == 'arm64'
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- name: Webpack
|
|
|
|
run: yarn run build
|
|
|
|
|
|
|
|
- name: Prepackage plugins
|
|
|
|
run: scripts/prepackage-plugins.js
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
|
|
|
|
- run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js
|
|
|
|
|
|
|
|
- name: Build and sign packages
|
|
|
|
run: scripts/build-macos.js
|
|
|
|
if: github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
|
|
|
APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }}
|
|
|
|
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}
|
|
|
|
USE_HARD_LINKS: false
|
|
|
|
# DEBUG: electron-builder,electron-builder:*
|
|
|
|
|
|
|
|
- name: Build packages without signing
|
|
|
|
run: scripts/build-macos.js
|
|
|
|
if: "! (github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')))"
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
# DEBUG: electron-builder,electron-builder:*
|
|
|
|
|
|
|
|
- name: Upload symbols
|
|
|
|
run: |
|
|
|
|
sudo npm install -g @sentry/cli --unsafe-perm
|
|
|
|
./scripts/sentry-upload.js
|
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
|
|
|
|
|
|
- name: Package artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifact-pkg
|
|
|
|
mv dist/*.pkg artifact-pkg/
|
|
|
|
mkdir artifact-zip
|
|
|
|
mv dist/*.zip artifact-zip/
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload PKG
|
|
|
|
with:
|
|
|
|
name: macOS .pkg (${{matrix.arch}})
|
|
|
|
path: artifact-pkg
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload ZIP
|
|
|
|
with:
|
|
|
|
name: macOS .zip (${{matrix.arch}})
|
|
|
|
path: artifact-zip
|
|
|
|
|
|
|
|
Linux-Build:
|
|
|
|
runs-on: ubuntu-18.04 # build against an older glibc for compatibility
|
|
|
|
needs: Lint
|
2022-06-15 13:01:27 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
build-arch: [ x64, arm64, armv7l ]
|
2022-09-04 18:59:48 +03:00
|
|
|
|
2022-03-21 13:20:26 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-06-15 13:01:27 +03:00
|
|
|
- name: Set up multiarch/qemu-user-static
|
|
|
|
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch != 'x64'
|
2022-06-15 13:01:27 +03:00
|
|
|
|
|
|
|
- name: Install Node (x64)
|
2022-05-17 07:12:32 +03:00
|
|
|
uses: actions/setup-node@v3.2.0
|
2022-03-21 13:20:26 +03:00
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-03-21 13:20:26 +03:00
|
|
|
|
2022-06-15 13:01:27 +03:00
|
|
|
- name: Install deps (x64)
|
2022-03-21 13:20:26 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libarchive-tools zsh
|
2022-06-15 13:01:27 +03:00
|
|
|
npm i -g yarn
|
2022-03-21 13:20:26 +03:00
|
|
|
yarn --network-timeout 1000000
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-09-04 18:59:48 +03:00
|
|
|
|
2022-06-15 13:01:27 +03:00
|
|
|
- name: Webpack (x64)
|
2022-03-21 13:20:26 +03:00
|
|
|
run: yarn run build
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-03-21 13:20:26 +03:00
|
|
|
|
2022-06-15 13:01:27 +03:00
|
|
|
- name: Prepackage plugins (x64)
|
2022-03-21 13:20:26 +03:00
|
|
|
run: scripts/prepackage-plugins.js
|
2022-06-15 13:01:27 +03:00
|
|
|
if: ${{matrix.build-arch == 'x64'}}
|
2022-09-04 18:59:48 +03:00
|
|
|
|
2022-06-15 13:01:27 +03:00
|
|
|
- name: Build packages (x64)
|
2022-03-21 13:20:26 +03:00
|
|
|
run: scripts/build-linux.js
|
2022-06-15 13:01:27 +03:00
|
|
|
if: ${{matrix.build-arch == 'x64'}}
|
2022-03-21 13:20:26 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
USE_HARD_LINKS: false
|
|
|
|
# DEBUG: electron-builder,electron-builder:*
|
|
|
|
|
|
|
|
- name: Build web resources
|
|
|
|
run: zsh -c 'tar czf tabby-web.tar.gz (tabby-*|web)/dist'
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-06-15 13:01:27 +03:00
|
|
|
|
|
|
|
- name: Install deps and Build (arm64)
|
|
|
|
uses: docker://multiarch/ubuntu-core:arm64-bionic
|
2022-09-04 18:59:48 +03:00
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
args: >
|
|
|
|
bash -c
|
|
|
|
"apt update && apt install curl lsb-release gnupg -y &&
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&
|
|
|
|
apt install make build-essential git ruby libarchive-tools nodejs rpm libsecret-1-dev libfontconfig1-dev -y &&
|
|
|
|
git config --global --add safe.directory /github/workspace &&
|
2022-08-27 18:09:46 +03:00
|
|
|
gem install public_suffix -v 4.0.7 &&
|
2022-06-15 13:01:27 +03:00
|
|
|
gem install fpm --no-document &&
|
|
|
|
npm i -g yarn &&
|
|
|
|
cd /github/workspace &&
|
|
|
|
yarn --network-timeout 1000000 &&
|
|
|
|
yarn run build &&
|
|
|
|
scripts/prepackage-plugins.js &&
|
|
|
|
USE_SYSTEM_FPM=true scripts/build-linux.js"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
USE_HARD_LINKS: false
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'arm64' && github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
|
2022-06-15 13:01:27 +03:00
|
|
|
|
|
|
|
- name: Install deps and Build (armv7l)
|
|
|
|
uses: docker://multiarch/ubuntu-core:armhf-bionic
|
2022-09-04 18:59:48 +03:00
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
args: >
|
|
|
|
bash -c
|
|
|
|
"apt update && apt install curl lsb-release gnupg -y &&
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&
|
|
|
|
apt install make build-essential git ruby libarchive-tools nodejs rpm libsecret-1-dev libfontconfig1-dev -y &&
|
|
|
|
git config --global --add safe.directory /github/workspace &&
|
2022-08-27 18:09:46 +03:00
|
|
|
gem install public_suffix -v 4.0.7 &&
|
2022-06-15 13:01:27 +03:00
|
|
|
gem install fpm --no-document &&
|
|
|
|
npm i -g yarn &&
|
|
|
|
cd /github/workspace &&
|
|
|
|
sed -i '/ \"electron\":/c\ \"electron\": \"17.0.0\",' package.json &&
|
|
|
|
yarn --network-timeout 1000000 &&
|
|
|
|
yarn run build &&
|
|
|
|
scripts/prepackage-plugins.js &&
|
|
|
|
USE_SYSTEM_FPM=true scripts/build-linux.js"
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
USE_HARD_LINKS: false
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'armv7l' && github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- name: Upload symbols
|
|
|
|
run: |
|
|
|
|
sudo npm install -g @sentry/cli --unsafe-perm
|
|
|
|
./scripts/sentry-upload.js
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-03-21 13:20:26 +03:00
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
|
|
|
|
|
|
- name: Upload packages to packagecloud.io
|
|
|
|
uses: Eugeny/packagecloud-action@main
|
|
|
|
if: github.repository == 'Eugeny/tabby' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
|
|
env:
|
|
|
|
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
|
|
|
with:
|
|
|
|
repo: 'eugeny/tabby'
|
|
|
|
dir: 'dist'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload DEB
|
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
name: Linux DEB (${{matrix.build-arch}})
|
|
|
|
path: dist/*.deb
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload RPM
|
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
name: Linux RPM (${{matrix.build-arch}})
|
|
|
|
path: dist/*.rpm
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload Pacman Package
|
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
name: Linux Pacman (${{matrix.build-arch}})
|
|
|
|
path: dist/*.pacman
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload Linux tarball
|
|
|
|
with:
|
2022-06-15 13:01:27 +03:00
|
|
|
name: Linux tarball (${{matrix.build-arch}})
|
|
|
|
path: dist/*.tar.gz
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload web tarball
|
|
|
|
with:
|
|
|
|
name: Web tarball
|
2022-06-15 13:01:27 +03:00
|
|
|
path: tabby-web.tar.gz
|
2022-09-04 19:04:33 +03:00
|
|
|
if: matrix.build-arch == 'x64'
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
Windows-Build:
|
|
|
|
runs-on: windows-2022
|
|
|
|
needs: Lint
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-04-09 20:08:39 +03:00
|
|
|
- arch: x64
|
2022-03-21 13:20:26 +03:00
|
|
|
- arch: arm64
|
2022-06-18 22:11:07 +03:00
|
|
|
fail-fast: false
|
2022-03-21 13:20:26 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Installing Node
|
2022-05-17 07:12:32 +03:00
|
|
|
uses: actions/setup-node@v3.2.0
|
2022-03-21 13:20:26 +03:00
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
|
|
|
- name: Update node-gyp
|
|
|
|
run: |
|
|
|
|
npm install --global node-gyp@8.4.1
|
|
|
|
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
|
|
|
|
|
|
|
|
- name: Build
|
2022-04-06 14:30:35 +03:00
|
|
|
shell: powershell
|
2022-03-21 13:20:26 +03:00
|
|
|
run: |
|
|
|
|
npm i -g yarn@1.19.1
|
|
|
|
yarn --network-timeout 1000000
|
|
|
|
yarn run build
|
|
|
|
node scripts/prepackage-plugins.js
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
|
|
|
|
- name: Build and sign packages
|
|
|
|
run: node scripts/build-windows.js
|
|
|
|
if: github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags'))
|
|
|
|
env:
|
2022-04-19 00:24:48 +03:00
|
|
|
ARCH: ${{matrix.arch}}
|
2022-03-21 13:20:26 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
|
|
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
|
|
|
DEBUG: electron-builder,electron-builder:*
|
|
|
|
|
|
|
|
- name: Build packages without signing
|
|
|
|
run: node scripts/build-windows.js
|
|
|
|
if: "!(github.repository == 'Eugeny/tabby' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')))"
|
|
|
|
env:
|
|
|
|
ARCH: ${{matrix.arch}}
|
|
|
|
|
|
|
|
- name: Upload symbols
|
|
|
|
run: |
|
|
|
|
npm install @sentry/cli
|
|
|
|
node scripts/sentry-upload.js
|
|
|
|
env:
|
|
|
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
|
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
|
|
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
|
|
|
|
|
|
|
- name: Package artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifact-setup
|
|
|
|
mv dist/*-setup-*.exe artifact-setup/
|
|
|
|
mkdir artifact-portable
|
|
|
|
mv dist/*-portable-*.zip artifact-portable/
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload installer
|
|
|
|
with:
|
|
|
|
name: Windows installer (${{matrix.arch}})
|
|
|
|
path: artifact-setup
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
name: Upload portable build
|
|
|
|
with:
|
|
|
|
name: Windows portable build (${{matrix.arch}})
|
|
|
|
path: artifact-portable
|