-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (73 loc) · 2.77 KB
/
jdeploy.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
74
75
76
77
78
# This workflow will build a Java project with Maven and bundle them as native app installers with jDeploy
# See https://www.jdeploy.com for more information.
name: jDeploy CI with Maven
on:
push:
branches: ['*', '!gh-pages']
tags: ['*']
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install xvfb
- name: Set up Git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '11'
java-package: jdk+fx
distribution: zulu
cache: maven
- name: Build with Maven
run: xvfb-run bash build.sh jar
- name: List files in ./target
run: ls -l ./javase/target
- name: Upload Build Artifacts
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }} # Control DMG creation with the CREATE_DMG variable
uses: actions/upload-artifact@v4
with:
name: build-target
path: ./javase/target
- name: Build App Installer Bundles
uses: shannah/jdeploy@feature/publish-targets
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
jdeploy_version: 'git://feature/publish-targets'
create_and_upload_dmg:
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }} # Control DMG creation with the CREATE_DMG variable
name: Create and upload DMG
permissions:
contents: write
runs-on: macos-latest
needs: build
steps:
- name: Set up Git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- uses: actions/checkout@v3
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-target
path: ./javase/target
- name: List files in ./javase/target
run: ls -l ./javase/target
- name: Create DMG and Upload to Release
uses: shannah/jdeploy-action-dmg@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
developer_id: ${{ secrets.MAC_DEVELOPER_ID }}
#developer_team_id: ${{ secrets.MAC_DEVELOPER_TEAM_ID }}
#developer_certificate_name: ${{ secrets.MAC_DEVELOPER_CERTIFICATE_NAME }}
developer_certificate_p12_base64: ${{ secrets.MAC_DEVELOPER_CERTIFICATE_P12_BASE64 }}
developer_certificate_password: ${{ secrets.MAC_DEVELOPER_CERTIFICATE_PASSWORD }}
notarization_password: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}