-
Notifications
You must be signed in to change notification settings - Fork 3.9k
71 lines (58 loc) · 1.93 KB
/
mac-unix-artifact-creation.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
name: Create Application Bundles
on:
push:
branches:
- 'mac'
workflow_dispatch:
jobs:
create-unix-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew bootJar
- name: Create Unix Launcher Script
run: |
chmod +x scripts/create-unix-launcher.sh
./scripts/create-unix-launcher.sh
- name: Create tar.gz Bundle
run: |
mkdir -p Stirling-PDF-unix
cp build/libs/Stirling-PDF-*.jar Stirling-PDF-unix/Stirling-PDF.jar
cp scripts/launcher.sh Stirling-PDF-unix/Stirling-PDF
cp src/main/resources/static/favicon.ico Stirling-PDF-unix/icon.png
chmod +x Stirling-PDF-unix/Stirling-PDF
tar -czf Stirling-PDF-unix.tar.gz Stirling-PDF-unix/
- name: Upload Unix Bundle
uses: actions/upload-artifact@v4
with:
name: unix-bundle
path: Stirling-PDF-unix.tar.gz
create-mac-bundle:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew bootJar
- name: Create Mac App Bundle
run: |
chmod +x scripts/create-mac-launcher.sh
./scripts/create-mac-launcher.sh
- name: Create DMG
run: |
hdiutil create -volname "Stirling-PDF" -srcfolder "Stirling-PDF.app" -ov -format UDZO "Stirling-PDF-mac.dmg"
- name: Upload Mac Bundle
uses: actions/upload-artifact@v4
with:
name: mac-bundle
path: Stirling-PDF-mac.dmg