Build for linux #9
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
name: Build for linux | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'App version' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Change binaries access permissions | |
run: chmod -R 777 packaging/bin/linux/ | |
- name: Update yt-dlp | |
run: packaging/bin/linux/yt-dlp -U | |
- name: Install fx-controls into local Maven repository | |
run: mvn install:install-file -Dfile='./lib/fx-controls-1.0.jar' -DgroupId='com.github.engatec' -DartifactId='fx-controls' -Dversion='1.0' -Dpackaging='jar' -DgeneratePom='true' | |
- name: Build with Maven | |
run: mvn clean package -Dassembly=linux | |
- name: Copy vdl.jar to binaries folder | |
run: cp target/vdl-assembly-linux.jar packaging/bin/linux/vdl.jar | |
- name: Create jar for update | |
run: cp target/vdl-assembly-linux.jar upd_linux.jar | |
- name: Create portable | |
run: jpackage --input packaging/bin/linux --name "vdl" --app-version ${{github.event.inputs.version}} --main-jar vdl.jar --main-class com.github.engatec.vdl.MainWrapper --icon packaging/icons/icon.png --type app-image --java-options "-Dapp.dir=\$APPDIR -Dapp.ytdlp=yt-dlp -Dapp.portable=true -Dapp.logPath=\$APPDIR -Djavafx.cachedir=\$APPDIR\cache" | |
- name: Compress portable | |
run: tar -czvf vdl-video-downloader-${{github.event.inputs.version}}-linux-portable.tar.gz vdl/ | |
- name: Create installer | |
run: jpackage --input packaging/bin/linux --name "vdl" --app-version ${{github.event.inputs.version}} --main-jar vdl.jar --main-class com.github.engatec.vdl.MainWrapper --icon packaging/icons/icon.png --type deb --java-options "-Dapp.dir=\$APPDIR -Dapp.ytdlp=yt-dlp" --linux-shortcut | |
- name: Rename installer | |
run: mv vdl_${{github.event.inputs.version}}*.deb vdl-video-downloader-${{github.event.inputs.version}}-linux.deb | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vdl_linux_package | |
path: | | |
upd_linux.jar | |
vdl-video-downloader-${{github.event.inputs.version}}-linux-portable.tar.gz | |
vdl-video-downloader-${{github.event.inputs.version}}-linux.deb | |
retention-days: 1 |