-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (52 loc) · 1.87 KB
/
Copy pathbuild_release.yml
File metadata and controls
64 lines (52 loc) · 1.87 KB
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
name: Build and Release
on:
push:
branches: [ "master", "main" ]
tags: [ "v*" ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build Fat JAR
run: ./gradlew shadowJar
- name: Verify JAR existence
run: dir build\libs
# Create a portable app image (directory with everything needed)
- name: Create Portable App Image
run: |
jpackage --input build/libs --name ArgentumOnline --main-jar argentum-online.jar --main-class org.aoclient.Main --type app-image --dest build/dist
# Note: Add --icon src/main/resources/icon.ico if you have an icon file
# Compress the portable app image for distribution
- name: Zip Portable App
run: |
Compress-Archive -Path build/dist/ArgentumOnline -DestinationPath build/dist/ArgentumOnline-Portable.zip
# Create a Windows Installer (setup.exe)
- name: Create EXE Installer
run: |
jpackage --input build/libs --name ArgentumOnline --main-jar argentum-online.jar --main-class org.aoclient.Main --type exe --dest build/dist --win-dir-chooser --win-menu --win-shortcut
continue-on-error: true # Depends on WiX Toolset stability or availability
- name: Upload Artifacts (Build)
uses: actions/upload-artifact@v4
with:
name: ArgentumOnline-Builds
path: |
build/libs/*.jar
build/dist/*.exe
build/dist/*.zip
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
build/libs/argentum-online.jar
build/dist/*.exe
build/dist/*.zip