SUB - Build on macOS #4
Workflow file for this run
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: SUB - Build on macOS | |
on: | |
workflow_dispatch: | |
inputs: | |
env: | |
description: "An Environment" | |
required: true | |
type: choice | |
options: | |
- development | |
- production | |
version: | |
description: "A Version" | |
required: true | |
type: string | |
workflow_call: | |
inputs: | |
env: | |
description: "An Environment" | |
required: true | |
type: string | |
version: | |
description: "A Version" | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: "macos-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: 4.2.5 | |
- uses: joshtynjala/setup-apache-flex-action@v2 | |
with: | |
flex-version: "4.16.1" | |
air-version: "33.1" | |
accept-air-license: true | |
- name: Build with Ant | |
run: > | |
ant | |
-buildfile MoonshineSDKInstaller/build/build.xml all | |
-Dapp.version=${{ inputs.version }} | |
-Dbuild.is.signed=false | |
-Dbuild.is.development=${{ inputs.env != 'production' }} | |
# Signing | |
- name: Sign App | |
uses: moonshine-ide/macos-sign-app-action@main | |
with: | |
app-path: MoonshineSDKInstaller/build/bin/app/MoonshineSDKInstaller.app | |
mac-keychain-pass: ${{ secrets.MAC_KEYCHAIN_PASS }} | |
mac-application-certkey: ${{ secrets.MAC_APPLICATION_CERTKEY }} | |
mac-certkey-pass: ${{ secrets.MAC_CERTKEY_PASS }} | |
- name: Create pkg | |
run: > | |
productbuild | |
--version ${{ inputs.version }} | |
--identifier net.prominic.MoonshineSDKInstaller \ | |
--component MoonshineSDKInstaller/build/bin/app/MoonshineSDKInstaller.app \ | |
/Applications \ | |
MoonshineSDKInstaller/build/bin/MoonshineSDKInstaller.pkg | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MoonshineSDKInstaller | |
path: MoonshineSDKInstaller/build/bin/MoonshineSDKInstaller-${{ inputs.version }}.pkg |