-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (94 loc) · 3.53 KB
/
beak-host.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: beak-host
on:
push:
tags:
- beak-app@*
branches:
- master
- develop
pull_request:
branches:
- '*'
paths:
- '.github/workflows/beak-host.yml'
- 'package.json'
- 'yarn.lock'
- 'apps-host/**'
- 'packages/**'
jobs:
build-deploy:
name: build, package, and upload or release
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '22'
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Install modules
run: yarn install --frozen-lockfile
- name: Lint, typecheck, and test
run: |
yarn lint
yarn typecheck:apps-host
- name: Build and package (release)
if: startsWith(github.ref, 'refs/tags/beak-app@')
env:
BUILD_ENVIRONMENT: ci
COMMIT_IDENTIFIER: ${{ github.sha }}
BUILD_NUMBER: ${{ steps.short-sha.outputs.sha }}
VERSION_RELEASE: 'qui'
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_FOR_PULL_REQUEST: true
USE_HARD_LINKS: false
NODE_OPTIONS: --max-old-space-size=8192
run: yarn package:release
- name: Build (non-release)
if: startsWith(github.ref, 'refs/tags/beak-app@') == false
env:
BUILD_ENVIRONMENT: ci
COMMIT_IDENTIFIER: ${{ github.sha }}
BUILD_NUMBER: ${{ steps.short-sha.outputs.sha }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_FOR_PULL_REQUEST: true
USE_HARD_LINKS: false
NODE_OPTIONS: --max-old-space-size=8192
run: yarn package
- name: Delete un-necessary artifacts
if: startsWith(github.ref, 'refs/tags/v') == false
run: |
rm -rf ./apps-host/electron/dist-electron/.icon-ico
rm -rf ./apps-host/electron/dist-electron/.icon-icns
rm -rf ./apps-host/electron/dist-electron/mac
rm -rf ./apps-host/electron/dist-electron/mac-arm64
rm -rf ./apps-host/electron/dist-electron/win-unpacked
rm -rf ./apps-host/electron/dist-electron/win-ia32-unpacked
rm -rf ./apps-host/electron/dist-electron/linux-unpacked
- name: Upload non-release artifacts to S3
if: startsWith(github.ref, 'refs/tags/v') == false
uses: shallwefootball/[email protected]
with:
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_S3_BUILDS_BUCKET }}
source_dir: 'apps-host/electron/dist-electron/'
destination_dir: 'commits/${{ github.sha }}/'