From 7745abbb8ad113180e6797bc3502b2a8ec4dee61 Mon Sep 17 00:00:00 2001
From: death-claw <53543762+death-claw@users.noreply.github.com>
Date: Wed, 24 May 2023 22:25:08 +0100
Subject: [PATCH] Update package.yml and version bump
---
.github/workflows/package.yml | 40 +++++++++++----
.github/workflows/release.yml | 93 +++++++++++++++++++++++++++--------
jpackage/jpackage-linux.cfg | 1 +
pom.xml | 5 +-
vripper-core/pom.xml | 9 +---
vripper-gui/pom.xml | 11 +----
vripper-web-ui/pom.xml | 2 +-
vripper-web/pom.xml | 6 +--
8 files changed, 112 insertions(+), 55 deletions(-)
diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
index 6791895e..ac06031a 100644
--- a/.github/workflows/package.yml
+++ b/.github/workflows/package.yml
@@ -1,6 +1,3 @@
-# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
-# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
-
name: Package
on:
@@ -8,11 +5,13 @@ on:
jobs:
build:
-
- runs-on: ubuntu-latest
-
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
+
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
@@ -23,13 +22,34 @@ jobs:
- name: Build with Maven
run: mvn -B install --file pom.xml
+
- name: Rename GUI artifact
run: mv vripper-gui/target/vripper-gui-*.jar vripper-gui/target/vripper-gui.jar
+
- name: Rename WEB artifact
run: mv vripper-web/target/vripper-web-*.jar vripper-web/target/vripper-web.jar
- - name: Package Linux
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Package Linux binaries
+ run: |
+ cd jpackage
+ cp ../vripper-gui/target/vripper-gui.jar jar/vripper-gui.jar
+ jpackage --type deb "@jpackage.cfg" "@jpackage-linux.cfg"
+ jpackage --type rpm "@jpackage.cfg" "@jpackage-linux.cfg"
+ ls -la dist
+
+ - if: matrix.os == 'windows-latest'
+ name: Package Windows binaries
+ run: |
+ cd jpackage
+ cp ../vripper-gui/target/vripper-gui.jar jar/vripper-gui.jar
+ jpackage "@jpackage.cfg" "@jpackage-windows.cfg"
+ dir dist
+
+ - if: matrix.os == 'macos-latest'
+ name: Package macOS binaries
run: |
cd jpackage
- jpackage --app-version 4.1.0 --type deb "@jpackage.cfg" "@jpackage-linux.cfg"
- jpackage --app-version 4.1.0 --type rpm "@jpackage.cfg" "@jpackage-linux.cfg"
- ls -la
+ cp ../vripper-gui/target/vripper-gui.jar jar/vripper-gui.jar
+ jpackage "@jpackage.cfg" "@jpackage-macos.cfg"
+ ls -la dist
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 091ec299..ee6e38ef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,6 +1,3 @@
-# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
-# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
-
name: Release
on:
@@ -9,11 +6,13 @@ on:
jobs:
build:
-
- runs-on: ubuntu-latest
-
+ strategy:
+ matrix:
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
+ runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
+
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
@@ -22,22 +21,76 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- - name: Build with Maven
- run: mvn -B install --file pom.xml
- - name: Rename GUI artifact
+ - name: Build Core Jar
+ run: mvn -B -q install --file vripper-core/pom.xml
+
+ - name: Build GUI Jar
+ run: mvn -B -q install --file vripper-gui/pom.xml
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Build WEB Jar
+ run: |
+ mvn -B -q install --file vripper-web-ui/pom.xml
+ mvn -B -q install --file vripper-web/pom.xml
+
+ - name: Rename GUI Jar
run: mv vripper-gui/target/vripper-gui-*.jar vripper-gui/target/vripper-gui.jar
- - name: Upload GUI Binary
- uses: skx/github-action-publish-binaries@master
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Upload GUI Jar
+ uses: softprops/action-gh-release@v1
with:
- args: 'vripper-gui/target/vripper-gui.jar'
- - name: Rename WEB artifact
+ files: vripper-gui/target/vripper-gui.jar
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Rename WEB Jar
run: mv vripper-web/target/vripper-web-*.jar vripper-web/target/vripper-web.jar
- - name: Upload WEB Binary
- uses: skx/github-action-publish-binaries@master
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Upload WEB Jar
+ uses: softprops/action-gh-release@v1
with:
- args: 'vripper-web/target/vripper-web.jar'
+ files: vripper-web/target/vripper-web.jar
+
+ - name: Prepare Packaging
+ run: |
+ cp vripper-gui/target/vripper-gui.jar jpackage/jar/vripper-gui.jar
+ - if: matrix.os == 'ubuntu-latest'
+ name: Package Linux
+ run: |
+ cd jpackage
+ jpackage --app-version ${{ github.event.release.tag_name }} --type deb "@jpackage.cfg" "@jpackage-linux.cfg"
+ jpackage --app-version ${{ github.event.release.tag_name }} --type rpm "@jpackage.cfg" "@jpackage-linux.cfg"
+
+ - if: matrix.os == 'ubuntu-latest'
+ name: Upload DEB and RPM package for Linux
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ jpackage/dist/vripper-${{ github.event.release.tag_name }}-1.x86_64.rpm
+ jpackage/dist/vripper_${{ github.event.release.tag_name }}-1_amd64.deb
+
+ - if: matrix.os == 'windows-latest'
+ name: Package Windows
+ run: |
+ cd jpackage
+ jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-windows.cfg"
+
+ - if: matrix.os == 'windows-latest'
+ name: Upload packages for Windows
+ uses: softprops/action-gh-release@v1
+ with:
+ files: jpackage/dist/VRipper-${{ github.event.release.tag_name }}.msi
+
+ - if: matrix.os == 'macos-latest'
+ name: Package macOS
+ run: |
+ cd jpackage
+ jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-macos.cfg"
+
+ - if: matrix.os == 'macos-latest'
+ name: Upload package for macOS
+ uses: softprops/action-gh-release@v1
+ with:
+ files: jpackage/dist/VRipper-${{ github.event.release.tag_name }}.pkg
\ No newline at end of file
diff --git a/jpackage/jpackage-linux.cfg b/jpackage/jpackage-linux.cfg
index 1ab805b2..1e53296d 100644
--- a/jpackage/jpackage-linux.cfg
+++ b/jpackage/jpackage-linux.cfg
@@ -1,6 +1,7 @@
--icon icon.png
--java-options "-Dbase.dir=${user.home}/.config"
--linux-package-name vripper
+--linux-app-release 1
--linux-menu-group Utility
--linux-app-category java
--linux-shortcut
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 7ee3d801..c04e4fef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,8 +12,5 @@
vripper-gui
pom
- 4.1.0
-
- true
-
+ 4.2.0
diff --git a/vripper-core/pom.xml b/vripper-core/pom.xml
index 637f1913..d39e0589 100644
--- a/vripper-core/pom.xml
+++ b/vripper-core/pom.xml
@@ -11,7 +11,7 @@
me.mnlr.vripper
vripper-core
- 4.1.0
+ 4.2.0
vripper-core
vripper-core
@@ -118,11 +118,4 @@
-
-
- github
- GitHub death-claw Apache Maven Packages
- https://maven.pkg.github.com/death-claw/vripper-project
-
-
diff --git a/vripper-gui/pom.xml b/vripper-gui/pom.xml
index 7a1a3a53..57f0c706 100644
--- a/vripper-gui/pom.xml
+++ b/vripper-gui/pom.xml
@@ -11,7 +11,7 @@
me.mnlr.vripper
vripper-gui
- 4.1.0
+ 4.2.0
vripper-gui
vripper-gui
@@ -99,7 +99,7 @@
vripper-core
me.mnlr.vripper
- 4.1.0
+ 4.2.0
@@ -144,11 +144,4 @@
-
-
- github
- GitHub death-claw Apache Maven Packages
- https://maven.pkg.github.com/death-claw/vripper-project
-
-
diff --git a/vripper-web-ui/pom.xml b/vripper-web-ui/pom.xml
index 9a7c1cb0..3a596cff 100644
--- a/vripper-web-ui/pom.xml
+++ b/vripper-web-ui/pom.xml
@@ -4,7 +4,7 @@
4.0.0
me.mnlr
vripper-web-ui
- 4.1.0
+ 4.2.0
vripper-web-ui
diff --git a/vripper-web/pom.xml b/vripper-web/pom.xml
index 46516694..ece1ada5 100644
--- a/vripper-web/pom.xml
+++ b/vripper-web/pom.xml
@@ -10,7 +10,7 @@
me.mnlr.vripper
vripper-web
- 4.1.0
+ 4.2.0
vripper-web
vripper-web
@@ -41,12 +41,12 @@
me.mnlr.vripper
vripper-core
- 4.1.0
+ 4.2.0
me.mnlr
vripper-web-ui
- 4.1.0
+ 4.2.0