mirror of
https://github.com/dev-claw/vripper-project.git
synced 2026-08-19 08:35:41 +02:00
168 lines
7.9 KiB
YAML
168 lines
7.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, windows-latest, macos-13, macos-latest ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up jdk21
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
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 gui jar
|
|
run: |
|
|
mvn -N -q install --file pom.xml
|
|
mvn -B -q install --file vripper-core/pom.xml
|
|
mvn -B -q install --file vripper-gui/pom.xml
|
|
mv vripper-gui/target/vripper-gui-${{ github.event.release.tag_name }}-jar-with-dependencies.jar vripper-gui/target/vripper-noarch-gui-${{ github.event.release.tag_name }}.jar
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Release gui Jar
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: vripper-gui/target/vripper-noarch-gui-${{ github.event.release.tag_name }}.jar
|
|
|
|
# Start building WEB jar in ubuntu only
|
|
- 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
|
|
mv vripper-web/target/vripper-web-${{ github.event.release.tag_name }}.jar vripper-web/target/vripper-noarch-web-${{ github.event.release.tag_name }}.jar
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Release web Jar
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: vripper-web/target/vripper-noarch-web-${{ github.event.release.tag_name }}.jar
|
|
# End building WEB jar in ubuntu only
|
|
|
|
- name: Prepare Packaging
|
|
run: |
|
|
cp vripper-gui/target/vripper-noarch-gui-${{ github.event.release.tag_name }}.jar jpackage/jar/vripper-gui.jar
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Package for Linux
|
|
run: |
|
|
cd jpackage
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-app-image.cfg" --icon resources/VRipper.png
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-linux.cfg" --resource-dir resources --type deb
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-linux.cfg" --resource-dir resources --type rpm
|
|
mv dist/vripper-${{ github.event.release.tag_name }}-1.x86_64.rpm dist/vripper-linux-${{ github.event.release.tag_name }}.x86_64.rpm
|
|
mv dist/vripper_${{ github.event.release.tag_name }}-1_amd64.deb dist/vripper-linux-${{ github.event.release.tag_name }}_amd64.deb
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
name: Package for Windows
|
|
run: |
|
|
cd jpackage
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-app-image.cfg" --icon resources/VRipper.ico
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-windows.cfg" --resource-dir resources --type msi
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-windows.cfg" --resource-dir resources --type exe
|
|
cd dist
|
|
ren VRipper-${{ github.event.release.tag_name }}.msi vripper-windows-installer-${{ github.event.release.tag_name }}.msi
|
|
ren VRipper-${{ github.event.release.tag_name }}.exe vripper-windows-installer-${{ github.event.release.tag_name }}.exe
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
name: Package for macOS(arm64)
|
|
run: |
|
|
cd jpackage
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-app-image.cfg" --icon resources/VRipper.icns
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-macos.cfg" --resource-dir resources --type pkg
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-macos.cfg" --resource-dir resources --type dmg
|
|
mv dist/VRipper-${{ github.event.release.tag_name }}.pkg dist/vripper-macos-${{ github.event.release.tag_name }}.arm64.pkg
|
|
mv dist/VRipper-${{ github.event.release.tag_name }}.dmg dist/vripper-macos-${{ github.event.release.tag_name }}.arm64.dmg
|
|
|
|
- if: matrix.os == 'macos-13'
|
|
name: Package for macOS(x86_64)
|
|
run: |
|
|
cd jpackage
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-app-image.cfg" --icon resources/VRipper.icns
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-macos.cfg" --resource-dir resources --type pkg
|
|
jpackage --app-version ${{ github.event.release.tag_name }} "@jpackage.cfg" "@jpackage-macos.cfg" --resource-dir resources --type dmg
|
|
mv dist/VRipper-${{ github.event.release.tag_name }}.pkg dist/vripper-macos-${{ github.event.release.tag_name }}.x86_64.pkg
|
|
mv dist/VRipper-${{ github.event.release.tag_name }}.dmg dist/vripper-macos-${{ github.event.release.tag_name }}.x86_64.dmg
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Zip Ubuntu portable
|
|
uses: thedoctor0/zip-release@0.7.1
|
|
with:
|
|
type: 'zip'
|
|
directory: 'jpackage/dist'
|
|
path: 'VRipper'
|
|
filename: 'vripper-linux-portable-${{ github.event.release.tag_name }}.zip'
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
name: Zip Windows portable
|
|
uses: thedoctor0/zip-release@0.7.1
|
|
with:
|
|
type: 'zip'
|
|
directory: 'jpackage/dist'
|
|
path: 'VRipper'
|
|
filename: 'vripper-windows-portable-${{ github.event.release.tag_name }}.zip'
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
name: Zip macOS(arm64) portable
|
|
uses: thedoctor0/zip-release@0.7.1
|
|
with:
|
|
type: 'zip'
|
|
directory: 'jpackage/dist'
|
|
path: 'VRipper.app'
|
|
filename: 'vripper-macos-portable-${{ github.event.release.tag_name }}.arm64.zip'
|
|
|
|
- if: matrix.os == 'macos-13'
|
|
name: Zip macOS(x86_64) portable
|
|
uses: thedoctor0/zip-release@0.7.1
|
|
with:
|
|
type: 'zip'
|
|
directory: 'jpackage/dist'
|
|
path: 'VRipper.app'
|
|
filename: 'vripper-macos-portable-${{ github.event.release.tag_name }}.x86_64.zip'
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
name: Release packages for Linux
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
jpackage/dist/vripper-linux-${{ github.event.release.tag_name }}.x86_64.rpm
|
|
jpackage/dist/vripper-linux-${{ github.event.release.tag_name }}_amd64.deb
|
|
jpackage/dist/vripper-linux-portable-${{ github.event.release.tag_name }}.zip
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
name: Release packages for Windows
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
jpackage/dist/vripper-windows-installer-${{ github.event.release.tag_name }}.msi
|
|
jpackage/dist/vripper-windows-installer-${{ github.event.release.tag_name }}.exe
|
|
jpackage/dist/vripper-windows-portable-${{ github.event.release.tag_name }}.zip
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
name: Release packages for macOS(arm64)
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
jpackage/dist/vripper-macos-${{ github.event.release.tag_name }}.arm64.pkg
|
|
jpackage/dist/vripper-macos-${{ github.event.release.tag_name }}.arm64.dmg
|
|
jpackage/dist/vripper-macos-portable-${{ github.event.release.tag_name }}.arm64.zip
|
|
|
|
- if: matrix.os == 'macos-13'
|
|
name: Release packages for macOS(x86_64)
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
jpackage/dist/vripper-macos-${{ github.event.release.tag_name }}.x86_64.pkg
|
|
jpackage/dist/vripper-macos-${{ github.event.release.tag_name }}.x86_64.dmg
|
|
jpackage/dist/vripper-macos-portable-${{ github.event.release.tag_name }}.x86_64.zip
|