mirror of
https://github.com/Eugeny/tabby
synced 2024-12-13 14:52:45 +00:00
Update build.yml
This commit is contained in:
parent
eb1a00ab16
commit
e86c4409bf
1 changed files with 80 additions and 31 deletions
111
.github/workflows/build.yml
vendored
111
.github/workflows/build.yml
vendored
|
@ -125,33 +125,45 @@ jobs:
|
||||||
Linux-Build:
|
Linux-Build:
|
||||||
runs-on: ubuntu-18.04 # build against an older glibc for compatibility
|
runs-on: ubuntu-18.04 # build against an older glibc for compatibility
|
||||||
needs: Lint
|
needs: Lint
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
build-arch: [ x64, arm64, armv7l ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install Node
|
- name: Set up multiarch/qemu-user-static
|
||||||
|
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
if: ${{matrix.build-arch != 'x64'}}
|
||||||
|
|
||||||
|
- name: Install Node (x64)
|
||||||
uses: actions/setup-node@v3.2.0
|
uses: actions/setup-node@v3.2.0
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps (x64)
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libarchive-tools zsh
|
sudo apt-get install libarchive-tools zsh
|
||||||
npm i -g yarn@1.19.1
|
npm i -g yarn
|
||||||
yarn --network-timeout 1000000
|
yarn --network-timeout 1000000
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
- name: Webpack
|
|
||||||
|
- name: Webpack (x64)
|
||||||
run: yarn run build
|
run: yarn run build
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
|
|
||||||
- name: Prepackage plugins
|
- name: Prepackage plugins (x64)
|
||||||
run: scripts/prepackage-plugins.js
|
run: scripts/prepackage-plugins.js
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
- name: Build packages
|
|
||||||
|
- name: Build packages (x64)
|
||||||
run: scripts/build-linux.js
|
run: scripts/build-linux.js
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
USE_HARD_LINKS: false
|
USE_HARD_LINKS: false
|
||||||
|
@ -159,11 +171,60 @@ jobs:
|
||||||
|
|
||||||
- name: Build web resources
|
- name: Build web resources
|
||||||
run: zsh -c 'tar czf tabby-web.tar.gz (tabby-*|web)/dist'
|
run: zsh -c 'tar czf tabby-web.tar.gz (tabby-*|web)/dist'
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
|
|
||||||
|
- name: Install deps and Build (arm64)
|
||||||
|
uses: docker://multiarch/ubuntu-core:arm64-bionic
|
||||||
|
with:
|
||||||
|
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 &&
|
||||||
|
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
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
if: ${{matrix.build-arch == 'arm64'}}
|
||||||
|
|
||||||
|
- name: Install deps and Build (armv7l)
|
||||||
|
uses: docker://multiarch/ubuntu-core:armhf-bionic
|
||||||
|
with:
|
||||||
|
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 &&
|
||||||
|
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
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
if: ${{matrix.build-arch == 'armv7l'}}
|
||||||
|
|
||||||
- name: Upload symbols
|
- name: Upload symbols
|
||||||
run: |
|
run: |
|
||||||
sudo npm install -g @sentry/cli --unsafe-perm
|
sudo npm install -g @sentry/cli --unsafe-perm
|
||||||
./scripts/sentry-upload.js
|
./scripts/sentry-upload.js
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
env:
|
env:
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
@ -178,48 +239,36 @@ jobs:
|
||||||
repo: 'eugeny/tabby'
|
repo: 'eugeny/tabby'
|
||||||
dir: 'dist'
|
dir: 'dist'
|
||||||
|
|
||||||
- name: Package artifacts
|
|
||||||
run: |
|
|
||||||
mkdir artifact-deb
|
|
||||||
mv dist/*.deb artifact-deb/ || true
|
|
||||||
mkdir artifact-rpm
|
|
||||||
mv dist/*.rpm artifact-rpm/ || true
|
|
||||||
mkdir artifact-pacman
|
|
||||||
mv dist/*.pacman artifact-pacman/ || true
|
|
||||||
mkdir artifact-tar.gz
|
|
||||||
mv dist/*.tar.gz artifact-tar.gz/ || true
|
|
||||||
mkdir artifact-web
|
|
||||||
mv tabby-web.tar.gz artifact-web/ || true
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload DEB
|
name: Upload DEB
|
||||||
with:
|
with:
|
||||||
name: Linux DEB (x86_64)
|
name: Linux DEB (${{matrix.build-arch}})
|
||||||
path: artifact-deb
|
path: dist/*.deb
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload RPM
|
name: Upload RPM
|
||||||
with:
|
with:
|
||||||
name: Linux RPM (x86_64)
|
name: Linux RPM (${{matrix.build-arch}})
|
||||||
path: artifact-rpm
|
path: dist/*.rpm
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload Pacman Package
|
name: Upload Pacman Package
|
||||||
with:
|
with:
|
||||||
name: Linux Pacman (x86_64)
|
name: Linux Pacman (${{matrix.build-arch}})
|
||||||
path: artifact-pacman
|
path: dist/*.pacman
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload Linux tarball
|
name: Upload Linux tarball
|
||||||
with:
|
with:
|
||||||
name: Linux tarball (x86_64)
|
name: Linux tarball (${{matrix.build-arch}})
|
||||||
path: artifact-tar.gz
|
path: dist/*.tar.gz
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload web tarball
|
name: Upload web tarball
|
||||||
with:
|
with:
|
||||||
name: Web tarball
|
name: Web tarball
|
||||||
path: artifact-web
|
path: tabby-web.tar.gz
|
||||||
|
if: ${{matrix.build-arch == 'x64'}}
|
||||||
|
|
||||||
|
|
||||||
Windows-Build:
|
Windows-Build:
|
||||||
|
|
Loading…
Reference in a new issue