-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (55 loc) · 2.61 KB
/
deploy-macos.yaml
File metadata and controls
65 lines (55 loc) · 2.61 KB
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
name: Build & Deploy MacOS
on:
push:
branches: [release]
jobs:
build:
runs-on: macos-latest
env:
APP_PATH: src-tauri/target/universal-apple-darwin/release/bundle/macos/Scriptio.app
PKG_PATH: Scriptio.pkg
steps:
- uses: actions/checkout@v6
- name: Import Apple certificates
uses: apple-actions/import-codesign-certs@v6
with:
p12-file-base64: ${{ secrets.APPLE_CERT_P12_COMBINED_BASE64 }}
p12-password: ${{ secrets.APPLE_CERT_PASSWORD }}
- name: Download provisioning profile
uses: apple-actions/download-provisioning-profiles@v5
with:
bundle-id: "app.scriptio"
profile-type: "MAC_APP_STORE"
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_KEY_P8 }}
- name: Copy provisioning profile to known path
run: |
PROFILE=$(ls "$HOME/Library/MobileDevice/Provisioning Profiles/"*.provisionprofile \
"$HOME/Library/MobileDevice/Provisioning Profiles/"*.mobileprovision \
2>/dev/null | head -n 1)
cp "$PROFILE" src-tauri/embedded.provisionprofile
- uses: actions/setup-node@v4
with: { node-version: "22" }
- uses: dtolnay/rust-toolchain@stable
with: { targets: "aarch64-apple-darwin, x86_64-apple-darwin" }
- name: Install dependencies
run: npm install
- name: Build and sign .app with Tauri
run: npm run tauri build -- --bundles app --target universal-apple-darwin --config src-tauri/tauri.appstore.conf.json
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
- name: Build signed .pkg installer
run: |
xcrun productbuild \
--component "$APP_PATH" /Applications \
--sign "${{ secrets.APPLE_INSTALLER_IDENTITY }}" \
"$PKG_PATH"
- name: Upload to App Store Connect
uses: apple-actions/upload-testflight-build@v3
with:
app-path: ${{ env.PKG_PATH }}
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_KEY_P8 }}
app-type: "macos"