Skip to content
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build macOS x64 Installer
on:
workflow_dispatch:
branches: [ master ]
push:
branches: [ master ]
paths:
- RCaNconstructor/**
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21.0.4
distribution: 'liberica'
java-package: jdk+fx
cache: 'maven'
- name: Import signing certificate into keychain
run: |
KEYCHAIN_FILE=default.keychain
KEYCHAIN_PASSWORD=myvoiceismypassport
security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_FILE
security default-keychain -s $KEYCHAIN_FILE
security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_FILE
security import <(echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode) \
-f pkcs12 \
-k $KEYCHAIN_FILE \
-P $SIGNING_CERTIFICATE_PASSWORD \
-T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_FILE
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA }}
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }}
- name: Build with Maven
run: mvn -X -B clean install --file RCaNconstructor/pom.xml
- name: Update Automatic Release
uses: mathieucarbou/marvinpinto-action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN}}"
automatic_release_tag: "macOS-latest"
prerelease: true
title: "macOS x64 Development Build"
files: ./RCaNconstructor/target/*.dmg