mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-13 07:59:59 +00:00
separate mac builds
This commit is contained in:
parent
7d7b2cbcfd
commit
90cc06c3fd
64
.github/workflows/macos-zip.yml
vendored
Normal file
64
.github/workflows/macos-zip.yml
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
name: macOS Build
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Installing Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
run: |
|
||||||
|
sudo npm i -g yarn@1.19.1
|
||||||
|
cd app
|
||||||
|
yarn
|
||||||
|
cd ..
|
||||||
|
rm app/node_modules/.yarn-integrity
|
||||||
|
yarn
|
||||||
|
|
||||||
|
- name: Build native deps
|
||||||
|
run: scripts/build-native.js
|
||||||
|
|
||||||
|
- name: Webpack
|
||||||
|
run: yarn run build
|
||||||
|
|
||||||
|
- name: Prepackage plugins
|
||||||
|
run: scripts/prepackage-plugins.js
|
||||||
|
|
||||||
|
# Prevent permission corruption caused by electron-builder
|
||||||
|
# This is the reason there's a separate workflow for the ZIP build
|
||||||
|
- 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-zip.js
|
||||||
|
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
||||||
|
env:
|
||||||
|
#DEBUG: electron-builder,electron-builder:*
|
||||||
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
|
APPSTORE_USERNAME: ${{ secrets.APPSTORE_USERNAME }}
|
||||||
|
APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build packages without signing
|
||||||
|
run: scripts/build-macos.js
|
||||||
|
if: github.repository != 'Eugeny/terminus' || github.event_name != 'push'
|
||||||
|
env:
|
||||||
|
DEBUG: electron-builder,electron-builder:*
|
||||||
|
|
||||||
|
- name: Package artifacts
|
||||||
|
run: |
|
||||||
|
mkdir artifact-zip
|
||||||
|
mv dist/*.zip artifact-zip/
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@master
|
||||||
|
name: Upload ZIP
|
||||||
|
with:
|
||||||
|
name: macOS .zip
|
||||||
|
path: artifact-zip
|
12
.github/workflows/macos.yml
vendored
12
.github/workflows/macos.yml
vendored
@ -2,7 +2,7 @@ name: macOS Build
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macOS-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -31,8 +31,6 @@ jobs:
|
|||||||
- name: Prepackage plugins
|
- name: Prepackage plugins
|
||||||
run: scripts/prepackage-plugins.js
|
run: scripts/prepackage-plugins.js
|
||||||
|
|
||||||
- run: sed -i '' 's/updateInfo = await/\/\/updateInfo = await/g' node_modules/app-builder-lib/out/targets/ArchiveTarget.js
|
|
||||||
|
|
||||||
- name: Build and sign packages
|
- name: Build and sign packages
|
||||||
run: scripts/build-macos.js
|
run: scripts/build-macos.js
|
||||||
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
if: github.repository == 'Eugeny/terminus' && github.event_name == 'push'
|
||||||
@ -54,17 +52,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir artifact-pkg
|
mkdir artifact-pkg
|
||||||
mv dist/*.pkg artifact-pkg/
|
mv dist/*.pkg artifact-pkg/
|
||||||
mkdir artifact-zip
|
|
||||||
mv dist/*.zip artifact-zip/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
name: Upload PKG
|
name: Upload PKG
|
||||||
with:
|
with:
|
||||||
name: macOS .pkg
|
name: macOS .pkg
|
||||||
path: artifact-pkg
|
path: artifact-pkg
|
||||||
|
|
||||||
- uses: actions/upload-artifact@master
|
|
||||||
name: Upload ZIP
|
|
||||||
with:
|
|
||||||
name: macOS .zip
|
|
||||||
path: artifact-zip
|
|
||||||
|
17
scripts/build-macos-zip.js
Normal file
17
scripts/build-macos-zip.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const builder = require('electron-builder').build
|
||||||
|
const vars = require('./vars')
|
||||||
|
|
||||||
|
const isTag = (process.env.GITHUB_REF || '').startsWith('refs/tags/')
|
||||||
|
const isCI = !!process.env.GITHUB_REF
|
||||||
|
|
||||||
|
builder({
|
||||||
|
dir: true,
|
||||||
|
mac: ['zip'],
|
||||||
|
config: {
|
||||||
|
extraMetadata: {
|
||||||
|
version: vars.version,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
publish: isTag ? 'always' : 'onTag',
|
||||||
|
}).catch(() => process.exit(1))
|
@ -7,7 +7,7 @@ const isCI = !!process.env.GITHUB_REF
|
|||||||
|
|
||||||
builder({
|
builder({
|
||||||
dir: true,
|
dir: true,
|
||||||
mac: ['pkg', 'zip'],
|
mac: ['pkg'],
|
||||||
config: {
|
config: {
|
||||||
extraMetadata: {
|
extraMetadata: {
|
||||||
version: vars.version,
|
version: vars.version,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user