Skip to content

Commit

Permalink
Update package.yml and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-claw committed May 25, 2023
1 parent e577dba commit 7745abb
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 55 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# 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:
workflow_dispatch:

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:
Expand All @@ -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
93 changes: 73 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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
1 change: 1 addition & 0 deletions jpackage/jpackage-linux.cfg
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@
<module>vripper-gui</module>
</modules>
<packaging>pom</packaging>
<version>4.1.0</version>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<version>4.2.0</version>
</project>
9 changes: 1 addition & 8 deletions vripper-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>me.mnlr.vripper</groupId>
<artifactId>vripper-core</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
<name>vripper-core</name>
<description>vripper-core</description>
<properties>
Expand Down Expand Up @@ -118,11 +118,4 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub death-claw Apache Maven Packages</name>
<url>https://maven.pkg.github.com/death-claw/vripper-project</url>
</repository>
</distributionManagement>
</project>
11 changes: 2 additions & 9 deletions vripper-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>me.mnlr.vripper</groupId>
<artifactId>vripper-gui</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
<name>vripper-gui</name>
<description>vripper-gui</description>
<dependencies>
Expand Down Expand Up @@ -99,7 +99,7 @@
<dependency>
<artifactId>vripper-core</artifactId>
<groupId>me.mnlr.vripper</groupId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -144,11 +144,4 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub death-claw Apache Maven Packages</name>
<url>https://maven.pkg.github.com/death-claw/vripper-project</url>
</repository>
</distributionManagement>
</project>
2 changes: 1 addition & 1 deletion vripper-web-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>me.mnlr</groupId>
<artifactId>vripper-web-ui</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
<name>vripper-web-ui</name>
<build>
<resources>
Expand Down
6 changes: 3 additions & 3 deletions vripper-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>me.mnlr.vripper</groupId>
<artifactId>vripper-web</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
<name>vripper-web</name>
<description>vripper-web</description>
<properties>
Expand Down Expand Up @@ -41,12 +41,12 @@
<dependency>
<groupId>me.mnlr.vripper</groupId>
<artifactId>vripper-core</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>me.mnlr</groupId>
<artifactId>vripper-web-ui</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 7745abb

Please sign in to comment.