Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
48dc4fd9e7
|
@ -0,0 +1,77 @@
|
|||
name: Make Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
jobs:
|
||||
make-linux-deb:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: temurin
|
||||
cache: maven
|
||||
|
||||
- name: Build Linux DEB Package for Release
|
||||
run: ./scripts/package-linux-deb.sh
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-deb
|
||||
path: '*.deb'
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
|
||||
make-windows-msi:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: temurin
|
||||
cache: maven
|
||||
|
||||
- name: Build Windows MSI Package for Release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }}
|
||||
run: powershell.exe -File scripts\package-windows-msi.ps1
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-msi
|
||||
path: '*.msi'
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
|
||||
make-release:
|
||||
needs:
|
||||
- make-linux-deb
|
||||
- make-windows-msi
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: release-artifacts
|
||||
merge-multiple: true
|
||||
- name: List Artifacts
|
||||
run: ls -R release-artifacts
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
fail-on-unmatched-files: true
|
||||
files: |
|
||||
release-artifacts/*.deb
|
||||
release-artifacts/*.msi
|
|
@ -3,13 +3,11 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- "*"
|
||||
tags:
|
||||
- "v*"
|
||||
jobs:
|
||||
maven-tests:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
|
@ -22,27 +20,5 @@ jobs:
|
|||
distribution: temurin
|
||||
cache: maven
|
||||
|
||||
- name: Check versions
|
||||
run: |
|
||||
java -version
|
||||
javac -version
|
||||
./mvnw -version
|
||||
|
||||
- name: Test with Maven
|
||||
run: ./mvnw -B verify --file pom.xml
|
||||
|
||||
- name: Build Linux DEB Package for Release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Linux' }}
|
||||
run: ./scripts/package-linux-deb.sh
|
||||
|
||||
- name: Build Windows MSI Package for Release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows' }}
|
||||
run: powershell.exe -File scripts/package-windows-msi.ps1
|
||||
|
||||
- name: Create Release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
fail_on_unmatched_files: false
|
||||
files: |
|
||||
*.deb
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>com.andrewlalis</groupId>
|
||||
<artifactId>perfin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>0.0.3</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
|
|
|
@ -11,13 +11,15 @@ function join_by {
|
|||
fi
|
||||
}
|
||||
|
||||
# Fix because H2 is not modular:
|
||||
rm target/lib/h2-*.jar
|
||||
|
||||
# Gets a ":"-separated string of all the dependency jar-files.
|
||||
module_jar_files=(target/lib/*)
|
||||
module_jar_files_path=$(join_by ":" ${module_jar_files[@]})
|
||||
module_path="target/classes:$module_jar_files_path"
|
||||
|
||||
# Fix because H2 is not modular:
|
||||
rm target/lib/h2-*.jar
|
||||
module_path="$module_path:target/modules/h2-2.2.224.jar"
|
||||
|
||||
jpackage \
|
||||
|
@ -26,9 +28,11 @@ jpackage \
|
|||
--description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." \
|
||||
--icon design/perfin-logo_256.png \
|
||||
--vendor "Andrew Lalis" \
|
||||
--about-url https://github.com/andrewlalis/perfin \
|
||||
--module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp \
|
||||
--module-path $module_path \
|
||||
--add-modules com.h2database \
|
||||
--type deb \
|
||||
--linux-deb-maintainer "andrewlalisofficial@gmail.com" \
|
||||
--linux-shortcut \
|
||||
--linux-menu-group "Office;Finance;Java" \
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
$projectDir = $PSScriptRoot
|
||||
|
||||
./mvnw.cmd clean package
|
||||
|
||||
$modules = Get-ChildItem -Path target/lib -Name | ForEach-Object { "lib\$_" }
|
||||
# Fix because H2 is not modular:
|
||||
Remove-Item -Path target\lib\h2-*.jar -Force
|
||||
|
||||
$modules = Get-ChildItem -Path target\lib -Name | ForEach-Object { "target\lib\$_" }
|
||||
$modulePath = $modules -join ';'
|
||||
$modulePath = "target\classes;$modulePath"
|
||||
|
||||
# Fix because H2 is not modular:
|
||||
$modulePath = "$modulePath;target\modules\h2-2.2.224.jar"
|
||||
|
||||
jpackage `
|
||||
--name "Perfin" `
|
||||
--app-version "0.0.1" `
|
||||
--description "Desktop application for personal finance. Add your accounts, track transactions, and store receipts, invoices, and more." `
|
||||
--icon design\perfin-logo_256.ico `
|
||||
--vendor "Andrew Lalis" `
|
||||
--about-url https://github.com/andrewlalis/perfin `
|
||||
--module com.andrewlalis.perfin/com.andrewlalis.perfin.PerfinApp `
|
||||
--module-path $modulePath `
|
||||
--add-modules com.h2database `
|
||||
--type msi `
|
||||
--win-menu `
|
||||
--win-shortcut-prompt `
|
||||
--win-help-url https://github.com/andrewlalis/perfin `
|
||||
|
|
Loading…
Reference in New Issue