-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (67 loc) · 2.68 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
# 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: ['master']
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '23'
distribution: 'temurin'
cache: maven
- name: Set up git
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build App Installer Bundles
uses: shannah/jdeploy@master
with:
github_token: ${{ github.token }}
- name: Upload Build Artifacts for DMG Action
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }} # Only needed if creating DMG
uses: actions/upload-artifact@v4
with:
name: build-target
path: ./target
create_and_upload_dmg:
# Enable DMG creation by setting JDEPLOY_CREATE_DMG variable on the repo.
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-an-environment
if: ${{ vars.JDEPLOY_CREATE_DMG == 'true' }}
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@v3
with:
name: build-target
path: ./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 }}
# Team ID and cert name only needed if it can't extract from the certifcate for some reason
# 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 }}