-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (69 loc) · 2.56 KB
/
maven-build-all-installer.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
71
72
73
# 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 All Installers
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ master ]
env:
DEV_IDENTITY: BXPZTQZ35S # Your Apple Dev identity, something like BXPZTQZ35S
PRIMARY_BUNDLE_ID: org.janelia.saalfeldlab.Paintera # Unique to your app, often the launcher class
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macOS-ARM64]
runs-on: ${{ matrix.os }}
env:
RELEASE_INSTALLERS: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- name: Download Wix
uses: i3h/download-release-asset@v1
if: matrix.os == 'windows-latest'
with:
owner: wixtoolset
repo: wix3
tag: wix3112rtm
file: wix311-binaries.zip
- name: Decompress Wix
uses: DuckSoft/[email protected]
if: matrix.os == 'windows-latest'
with:
pathSource: wix311-binaries.zip
pathTarget: ./target/wix
- name: Add Wix to Path
run: echo "$HOME/target/wix" >> $GITHUB_PATH
if: matrix.os == 'windows-latest'
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 18.0.2
distribution: 'liberica'
java-package: jdk+fx
cache: 'maven'
- name: "Build with Maven"
if: matrix.os != 'macos-latest' && matrix.os != 'macOS-ARM64'
run: mvn -B clean install -DskipTests -Pbuild-installer --file pom.xml
- name: "Build with Maven (macOS No Signing)"
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
if: ${{ env.MACOS_CERTIFICATE == null && (matrix.os == 'macos-latest' || matrix.os == 'macOS-ARM64') }}
run: mvn -B clean install -DskipTests -Pbuild-installer --file pom.xml
- name: Update Automatic Release
uses: marvinpinto/action-automatic-releases@latest
if: ${{ env.RELEASE_INSTALLERS }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN}}"
automatic_release_tag: ${{ matrix.os }}
prerelease: true
title: ${{ matrix.os }} Development Build
files: |
${{ env.DMG_PATH }}
./target/*.msi
./target/*.dmg
./target/*.deb