server
Clone or download
Modified Files
name: Build Linux
name: Build Linux
on:
on:
workflow_run:
workflow_run:
workflows: ["Initial Setup"]
workflows: ["Initial Setup"]
types:
types:
- completed
- completed
jobs:
jobs:
build:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-20.04
steps:
steps:
- name: Install packages
- name: Install packages
run: sudo apt install xdg-utils libc6 xdg-utils zlib1g libpng16-16 libasound2 libbsd-dev zip libblkid1 libdbus-1-3 libexpat1 libgpg-error0 liblzma5 libmount1 libpcre3 libselinux1 libsystemd0 libuuid1
run: sudo apt install xdg-utils libc6 xdg-utils zlib1g libpng16-16 libasound2 libbsd-dev zip libblkid1 libdbus-1-3 libexpat1 libgpg-error0 liblzma5 libmount1 libpcre3 libselinux1 libsystemd0 libuuid1
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Setup java
- name: Setup java
uses: joschi/setup-jdk@v2
uses: joschi/setup-jdk@v2
with:
with:
java-version: 16
java-version: 16
- name: Delete Default.zip
- name: Delete Default.zip
run: |
run: |
rm -rf src/main/resources/com/stream_pi/server/Default.zip
rm -rf src/main/resources/com/stream_pi/server/Default.zip
- name: Downloading Default.zip ...
- name: Downloading Default.zip ...
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: build-essential-actions.yml
workflow: init.yml
name: default-zip
name: default-zip
path: src/main/resources/com/stream_pi/server
path: src/main/resources/com/stream_pi/server
- name: Setup JavaFX
- name: Setup JavaFX
run: |
run: |
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+11_linux-x64_bin-jmods.zip
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+11_linux-x64_bin-jmods.zip
unzip /tmp/openjfx-17-ea+11_linux-x64_bin-jmods.zip -d /tmp
unzip /tmp/openjfx-17-ea+11_linux-x64_bin-jmods.zip -d /tmp
- name: Download built jars
- name: Download built jars
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: init.yml
workflow: init.yml
name: built-jars
name: built-jars
path: target/lib/
path: target/lib/
- name: Download REQ_MODULES
- name: Download REQ_MODULES
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: init.yml
workflow: init.yml
name: req_modules
name: req_modules
- name: Download VERSION
- name: Download VERSION
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: init.yml
workflow: init.yml
name: version
name: version
- name: Add VERSION to environment
- name: Add VERSION to environment
run: |
run: |
echo "VERSION=$(<version.txt)" >> $GITHUB_ENV
echo "VERSION=$(<version.txt)" >> $GITHUB_ENV
- name: Add REQ_MODULES to environment
- name: Add REQ_MODULES to environment
run: |
run: |
echo "REQ_MODULES=$(<req_modules.txt)" >> $GITHUB_ENV
echo "REQ_MODULES=$(<req_modules.txt)" >> $GITHUB_ENV
- name: Create Bundle using JPackage
- name: Create Bundle using JPackage
run: |
run: |
# Create DEB
# Create DEB
.github/scripts/jpackage.sh \
.github/scripts/jpackage.sh \
--icon assets/linux-icon.png \
--icon assets/linux-icon.png \
--app-version ${{ env.VERSION }} \
--app-version ${{ env.VERSION }} \
--linux-menu-group "Stream-Pi" \
--linux-menu-group "Stream-Pi" \
--license-file LICENSE.txt \
--license-file LICENSE.txt \
--type deb
--type deb
# Create App Image
# Create App Image
.github/scripts/jpackage.sh \
.github/scripts/jpackage.sh \
--icon assets/linux-icon.png \
--icon assets/linux-icon.png \
--app-version ${{ env.VERSION }} \
--app-version ${{ env.VERSION }} \
--type app-image
--type app-image
cd $INSTALL_DIR
cd $INSTALL_DIR
mv *.deb stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb
mv *.deb stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb
mv 'Stream-Pi Server' stream-pi-server-${{ env.VERSION }}
mv 'Stream-Pi Server' stream-pi-server-${{ env.VERSION }}
zip -r stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip stream-pi-server-${{ env.VERSION }}
zip -r stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip stream-pi-server-${{ env.VERSION }}
rm -r stream-pi-server-${{ env.VERSION }}
rm -r stream-pi-server-${{ env.VERSION }}
env:
env:
MAIN_CLASS: com.stream_pi.server.Main
MAIN_CLASS: com.stream_pi.server.Main
JAVAFX_JMODS: /tmp/javafx-jmods-17/
JAVAFX_JMODS: /tmp/javafx-jmods-17/
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
INSTALL_DIR: target/install
INSTALL_DIR: target/install
- name: Saving Linux x64 DEB
- name: Saving Linux x64 DEB
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: linux-deb
name: linux-deb
path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb
path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb
- name: Saving Linux x64 ZIP
- name: Saving Linux x64 ZIP
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: linux-zip
name: linux-zip
path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip
path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip