-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (61 loc) · 2.16 KB
/
build-mac.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
68
69
70
name: Build mac
on:
push:
branches: master
release:
types: [created]
workflow_dispatch: {}
jobs:
build:
name: Build for StandaloneOSX
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Build project
uses: game-ci/unity-builder@v4
id: buildStep
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneOSX
buildName: hatbor
versioning: Semantic
- name: Import Apple Certificate
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }}
p12-password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
- name: Post Process Build
env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_TEAM_NAME: ${{ secrets.APPLE_TEAM_NAME }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
MAC_BUILD_PATH: ${{ format('{0}/build/StandaloneOSX', github.workspace) }}
PROJECT_NAME: hatbor
BUNDLE_IDENTIFIER: com.neoneobeam.hatbor
VERSION: ${{ steps.buildStep.outputs.buildVersion }}
run: ./post-process-build-mac.sh
- uses: actions/upload-artifact@v3
with:
name: hatbor-macOS-${{ steps.buildStep.outputs.buildVersion }}
path: hatbor.dmg
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./hatbor.dmg
asset_name: hatbor-macOS-${{ steps.buildStep.outputs.buildVersion }}.zip
asset_content_type: application/octet-stream