Merge pull request #36 from kaikoga/gachikoi #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}.dmg | |
asset_content_type: application/octet-stream |