Update build.yml

This commit is contained in:
Eugene Pankov 2022-09-04 18:04:33 +02:00
parent 7674f20adf
commit 9c7a1dba97
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -62,7 +62,7 @@ jobs:
run: | run: |
rm -rf app/node_modules/cpu-features rm -rf app/node_modules/cpu-features
rm -rf app/node_modules/ssh2/crypto/build rm -rf app/node_modules/ssh2/crypto/build
if: ${{ matrix.arch == 'arm64' }} if: matrix.arch == 'arm64'
- name: Webpack - name: Webpack
run: yarn run build run: yarn run build
@ -129,8 +129,6 @@ jobs:
matrix: matrix:
build-arch: [ x64, arm64, armv7l ] build-arch: [ x64, arm64, armv7l ]
if: ${{matrix.build-arch == "x64" || (github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags'))}}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -139,13 +137,13 @@ jobs:
- name: Set up multiarch/qemu-user-static - name: Set up multiarch/qemu-user-static
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
if: ${{matrix.build-arch != 'x64'}} if: matrix.build-arch != 'x64'
- name: Install Node (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'}} if: matrix.build-arch == 'x64'
- name: Install deps (x64) - name: Install deps (x64)
run: | run: |
@ -153,11 +151,11 @@ jobs:
sudo apt-get install libarchive-tools zsh sudo apt-get install libarchive-tools zsh
npm i -g yarn npm i -g yarn
yarn --network-timeout 1000000 yarn --network-timeout 1000000
if: ${{matrix.build-arch == 'x64'}} if: matrix.build-arch == 'x64'
- name: Webpack (x64) - name: Webpack (x64)
run: yarn run build run: yarn run build
if: ${{matrix.build-arch == 'x64'}} if: matrix.build-arch == 'x64'
- name: Prepackage plugins (x64) - name: Prepackage plugins (x64)
run: scripts/prepackage-plugins.js run: scripts/prepackage-plugins.js
@ -173,11 +171,10 @@ 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'}} if: matrix.build-arch == 'x64'
- name: Install deps and Build (arm64) - name: Install deps and Build (arm64)
uses: docker://multiarch/ubuntu-core:arm64-bionic uses: docker://multiarch/ubuntu-core:arm64-bionic
if: github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
with: with:
args: > args: >
bash -c bash -c
@ -196,11 +193,10 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: false USE_HARD_LINKS: false
if: ${{matrix.build-arch == 'arm64'}} if: matrix.build-arch == 'arm64' && github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
- name: Install deps and Build (armv7l) - name: Install deps and Build (armv7l)
uses: docker://multiarch/ubuntu-core:armhf-bionic uses: docker://multiarch/ubuntu-core:armhf-bionic
if: github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
with: with:
args: > args: >
bash -c bash -c
@ -220,13 +216,13 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: false USE_HARD_LINKS: false
if: ${{matrix.build-arch == 'armv7l'}} if: matrix.build-arch == 'armv7l' && github.repository == 'Eugeny/tabby' && startsWith(github.ref, 'refs/tags')
- 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'}} 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 }}
@ -270,7 +266,7 @@ jobs:
with: with:
name: Web tarball name: Web tarball
path: tabby-web.tar.gz path: tabby-web.tar.gz
if: ${{matrix.build-arch == 'x64'}} if: matrix.build-arch == 'x64'
Windows-Build: Windows-Build: