-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (73 loc) · 2.63 KB
/
build-release.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
79
80
81
82
name: Build Release ZIPs
on:
push:
tags:
- "v*.*.*"
jobs:
build-windows:
name: Build Windows ZIPs
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build standard release
run: ./gradlew distZip
- name: Upload standard release
uses: actions/upload-artifact@v3
with:
name: OpenSR Launchpad ${{github.ref_name}} (Standard-Windows).zip
path: build/distributions/OpenStarRuler-Launchpad.zip
- name: Build standalone release
run: ./gradlew jlink
- name: Create standalone launcher
run: '"bin\OSRLaunchpad.bat" | Out-File -FilePath OSRLaunchpad.bat -Encoding "ascii"'
shell: powershell
- name: Pack standalone release
run: New-Item -Name "OpenStarRuler-Launchpad" -ItemType "directory"; Rename-Item README.md README.txt; Copy-Item -Path README.txt,LICENSE.txt,build/image/*,OSRLaunchpad.bat -Destination "OpenStarRuler-Launchpad" -Recurse; Compress-Archive -Path "OpenStarRuler-Launchpad" -DestinationPath "standalone-windows.zip"
shell: powershell
- name: Upload standalone release
uses: actions/upload-artifact@v3
with:
name: OpenSR Launchpad ${{github.ref_name}} (Standalone-Win64).zip
path: standalone-windows.zip
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build standard release
run: ./gradlew distZip
- name: Upload standard release
uses: actions/upload-artifact@v3
with:
name: OpenSR Launchpad ${{github.ref_name}} (Standard-Linux).zip
path: build/distributions/OpenStarRuler-Launchpad.zip
# TODO: Figure out launcher script (and whether one is even needed)
#- name: Build standalone release
# run: ./gradlew jlink
deploy:
name: Attach ZIPs to release
needs:
- build-windows
- build-linux
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Attach artifacts
uses: softprops/action-gh-release@v1
with:
files: '**/OpenSR Launchpad*.zip'
fail_on_unmatched_files: true