-
Notifications
You must be signed in to change notification settings - Fork 29
88 lines (75 loc) · 2.77 KB
/
publish-app.yaml
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
name: publish-app
on:
workflow_dispatch:
inputs:
build_mac:
type: boolean
default: true
build_window:
type: boolean
default: true
env:
AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }}
AWS_BUCKET: ${{ vars.AWS_BUCKET }}
DEV_USE_BETA_LANE: ${{ github.ref_name != 'release' && 't' }}
jobs:
deploy-mac:
runs-on: macos-latest
if: inputs.build_mac == true
steps:
- name: Echo Settings
run: |
echo "S3 - ${{ env.AWS_DEFAULT_REGION }}/${{ env.AWS_BUCKET }}"
echo "Update lane - ${{ env.DEV_USE_BETA_LANE == 't' && 'beta' || 'production' }}"
- name: Github checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Add osx certs
run: |
chmod +x ./build/add-osx-cert.sh
./build/add-osx-cert.sh
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Prepare for app notarization (mac)
run: echo "${{ secrets.APPLE_API_KEY }}" | base64 -d > ./AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8
- name: Install Packages
run: yarn install --frozen-lockfile
- name: Publish app
run: yarn publish-app --arch universal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
APPLE_APP_BUNDLE_ID: ${{ vars.APPLE_APP_BUNDLE_ID }}
deploy-windows:
runs-on: windows-latest
# release 브랜치는 프로덕션 빌드만 목적으로 두기 때문에, 윈도우 베타 빌드는 생략한다.
if: inputs.build_window == true && github.ref_name != 'release'
steps:
- name: Echo Settings
run: |
echo "S3 - ${{ env.AWS_DEFAULT_REGION }}/${{ env.AWS_BUCKET }}"
echo "Update lane - beta"
- name: Github checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Packages
run: yarn install --frozen-lockfile
- name: Publish app
run: yarn publish-app
env:
# windows 빌드는 code sign을 생략한 베타버전만 CI로 빌드가 가능하다.
DEV_USE_BETA_LANE: "t"
DEV_SKIP_SIGN: "t"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}