Skip to content

Commit e8f0556

Browse files
committed
v2.0 macOS Native
1 parent e791840 commit e8f0556

360 files changed

Lines changed: 6998 additions & 25360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-workflow.yml

Lines changed: 0 additions & 150 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 104 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,110 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: [main]
7+
workflow_dispatch:
8+
inputs:
9+
notarize:
10+
description: "Notarize the DMG"
11+
required: false
12+
default: "false"
13+
type: choice
14+
options:
15+
- "false"
16+
- "true"
17+
18+
permissions:
19+
contents: read
820

921
jobs:
1022
build:
11-
uses: ./.github/workflows/build-workflow.yml
12-
with:
13-
upload-artifacts: false
14-
secrets:
15-
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
16-
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
17-
APPLE_ID: ${{ secrets.APPLE_ID }}
18-
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
19-
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
23+
name: Build · Sign · (Notarize)
24+
runs-on: macos-14
25+
timeout-minutes: 30
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Select Xcode 15
32+
run: sudo xcode-select -s /Applications/Xcode_15.4.app
33+
34+
- name: Install XcodeGen
35+
run: brew install xcodegen
36+
37+
- name: Generate project
38+
run: xcodegen generate
39+
40+
- name: Build (Debug, no signing)
41+
run: |
42+
xcodebuild \
43+
-project CineScreen.xcodeproj \
44+
-scheme CineScreen \
45+
-configuration Debug \
46+
-derivedDataPath build/derived \
47+
-destination 'platform=macOS' \
48+
CODE_SIGN_IDENTITY="-" \
49+
CODE_SIGNING_REQUIRED=NO \
50+
build | tee build/build.log
51+
52+
- name: Import signing certificate
53+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
54+
env:
55+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
56+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
57+
run: |
58+
set -euo pipefail
59+
KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain
60+
KEYCHAIN_PWD=$(openssl rand -hex 16)
61+
security create-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN_PATH"
62+
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
63+
security unlock-keychain -p "$KEYCHAIN_PWD" "$KEYCHAIN_PATH"
64+
echo "$APPLE_CERTIFICATE" | base64 -d > $RUNNER_TEMP/cert.p12
65+
security import $RUNNER_TEMP/cert.p12 \
66+
-k "$KEYCHAIN_PATH" \
67+
-P "$APPLE_CERTIFICATE_PASSWORD" \
68+
-T /usr/bin/codesign \
69+
-T /usr/bin/security
70+
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PWD" "$KEYCHAIN_PATH"
71+
security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | xargs)
72+
73+
- name: Archive (Release, signed)
74+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
75+
run: make archive
76+
77+
- name: Export signed app
78+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
79+
run: make export
80+
81+
- name: Create DMG
82+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
83+
run: make dmg
84+
85+
- name: Notarize and staple
86+
if: (github.event_name == 'workflow_dispatch' && inputs.notarize == 'true') || github.ref_type == 'tag'
87+
env:
88+
APPLE_ID: ${{ secrets.APPLE_ID }}
89+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
90+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
91+
run: |
92+
xcrun notarytool submit build/CineScreen.dmg \
93+
--apple-id "$APPLE_ID" \
94+
--team-id "$APPLE_TEAM_ID" \
95+
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
96+
--wait
97+
xcrun stapler staple build/CineScreen.dmg
98+
99+
- name: Upload DMG artifact
100+
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag'
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: CineScreen-mac
104+
path: build/CineScreen.dmg
105+
if-no-files-found: error
106+
107+
- name: Upload build log on failure
108+
if: failure()
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: build-log
112+
path: build/build.log
113+
if-no-files-found: ignore

.github/workflows/deploy-website.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)