-
Notifications
You must be signed in to change notification settings - Fork 15
67 lines (55 loc) · 1.9 KB
/
test.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
name: test
on:
push:
branches-ignore:
- master
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
disable_sign:
description: '禁用签名'
required: false
type: boolean
jobs:
build-test:
runs-on: macos-13
env:
USE_CODE_SIGN: ${{ !inputs.disable_sign && github.actor_id == github.repository_owner_id && 'enable' || 'disable' }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: switch xcode version
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app
- name: import application certificate
id: keychain
uses: apple-actions/import-codesign-certs@v2
if: ${{ !inputs.disable_sign && github.actor_id == github.repository_owner_id }}
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: import installer certificate
uses: apple-actions/import-codesign-certs@v2
if: ${{ !inputs.disable_sign && github.actor_id == github.repository_owner_id }}
with:
create-keychain: false
keychain-password: ${{ steps.keychain.outputs.keychain-password }}
p12-file-base64: ${{ secrets.CERTIFICATES_INSTALLER_P12 }}
p12-password: ${{ secrets.CERTIFICATES_INSTALLER_P12_PASSWORD }}
- name: prepare sqlcipher
run: ./scripts/0_prepare_sqlcipher.sh
- name: build Fire.app
run: ./scripts/a_build_app.sh
- name: build FireInstaller.pkg
run: ./scripts/b_build_installer.sh
- name: generate appcast.xml
if: ${{ !inputs.disable_sign && github.actor_id == github.repository_owner_id }}
env:
sparkle_key: ${{ secrets.sparkle_key }}
run: ./scripts/d_build_appcast.sh
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/
retention-days: 3