forked from yarl/pattypan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github action for building EXE (#3)
- Loading branch information
1 parent
ae10043
commit cba7b63
Showing
5 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Make self-contained Windows EXE | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Java runtime | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
java-package: jdk+fx | ||
- name: Build with Ant | ||
run: ant -noinput -buildfile build.xml compile jar | ||
- name: Fetch 7-zip SFX | ||
run: | | ||
curl -LO https://www.7-zip.org/a/lzma2201.7z | ||
7z e '-i!bin/7zSD.sfx' lzma2201.7z | ||
- name: Download Java runtime for executable | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
java-package: jre+fx | ||
- name: Create archive | ||
run: | | ||
mkdir pattypan-exe | ||
cp -r ${{ env.JAVA_HOME }} pattypan-exe/java | ||
cp pattypan.jar pattypan-exe | ||
cp windows/run.bat pattypan-exe | ||
cd pattypan-exe | ||
7z a -mx1 ../pattypan.7z * | ||
- name: Create executable | ||
run: cmd /c copy /b 7zSD.sfx + windows\7z-sfx.cfg + pattypan.7z pattypan.exe | ||
- name: Make release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: pattypan.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
;!@Install@!UTF-8! | ||
Title="Pattypan" | ||
RunProgram="run.bat" | ||
;!@InstallEnd@! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
java\bin\java.exe -jar pattypan.jar |