-
Notifications
You must be signed in to change notification settings - Fork 3.8k
63 lines (55 loc) · 2.01 KB
/
build-enjoy-app.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
name: Build Enjoy App
on:
workflow_dispatch:
inputs:
os:
type: choice
description: Choose os
options:
- macos-12
- macos-14
- windows-latest
- ubuntu-latest
jobs:
build:
runs-on: ${{ github.event.inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDDHHmm
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ github.event.inputs.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Install Apple certificate
if: contains(github.event.inputs.os, 'macos')
env:
MACOS_CERTIFICATE_APPLICATION_BASE64: ${{ secrets.MACOS_CERTIFICATE_APPLICATION_BASE64 }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
run: ./enjoy/scripts/add-macos-cert.sh
- name: Make
env:
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
APPLE_ID: ${{ runner.os == 'macOS' && secrets.APPLE_ID || '' }}
APPLE_APP_PASSWORD: ${{ runner.os == 'macOS' && secrets.APPLE_APP_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ runner.os == 'macOS' && secrets.APPLE_TEAM_ID || '' }}
run: yarn run make:enjoy
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Enjoy-${{ runner.os }}-${{ github.event.inputs.os == 'macos-14' && 'arm64' || 'x64' }}-build-${{ github.ref_name }}-${{ steps.current-time.outputs.formattedTime }}
path: |
enjoy/out/make/**/*.deb
enjoy/out/make/**/*.rpm
enjoy/out/make/**/*.zip
enjoy/out/make/**/*.exe
enjoy/out/make/**/*.dmg