server
Clone or download
Modified Files
name: Build
name: Build
on:
on:
workflow_run:
workflow_run:
workflows: ["Init"]
workflows: ["Init"]
types:
types:
- completed
- completed
jobs:
jobs:
build-linux:
build-linux:
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: init.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+12_linux-x64_bin-jmods.zip
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+12_linux-x64_bin-jmods.zip
unzip /tmp/openjfx-17-ea+12_linux-x64_bin-jmods.zip -d /tmp
unzip /tmp/openjfx-17-ea+12_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 DEB, PKG, ZIP
- name: Create DEB, PKG, ZIP
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
$NEW_V=${{ env.VERSION }}
NEW_V=${{ env.VERSION }}
$NEW_V=${NEW_V//-/_}
NEW_V=${NEW_V//-/_}
# 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 $NEW_V \
--app-version $NEW_V \
--type rpm
--type rpm
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 *.rpm stream-pi-server-linux-x64-${{ env.VERSION }}-debian.rpm
mv *.rpm stream-pi-server-linux-x64-${{ env.VERSION }}-debian.rpm
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 RPM
- name: Saving Linux x64 RPM
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: linux-rpm
name: linux-rpm
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
build-macos:
build-macos:
runs-on: macos-10.15
runs-on: macos-10.15
steps:
steps:
- 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: init.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+12_linux-x64_bin-jmods.zip
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+12_linux-x64_bin-jmods.zip
unzip /tmp/openjfx-17-ea+12_linux-x64_bin-jmods.zip -d /tmp
unzip /tmp/openjfx-17-ea+12_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 DMG, PKG
- name: Create DMG, PKG
run: |
run: |
# Create DMG
# Create DMG
.github/scripts/jpackage.sh \
.github/scripts/jpackage.sh \
--icon assets/macos-icon.icns \
--icon assets/macos-icon.icns \
--license-file LICENSE.txt \
--license-file LICENSE.txt \
--type dmg
--type dmg
# Create PKG
# Create PKG
.github/scripts/jpackage.sh \
.github/scripts/jpackage.sh \
--icon assets/macos-icon.icns \
--icon assets/macos-icon.icns \
--license-file LICENSE.txt \
--license-file LICENSE.txt \
--mac-package-identifier stream-pi-server \
--mac-package-identifier stream-pi-server \
--type pkg
--type pkg
cd $INSTALL_DIR
cd $INSTALL_DIR
mv *.dmg stream-pi-server-macos-x64-${{ env.VERSION }}.dmg
mv *.dmg stream-pi-server-macos-x64-${{ env.VERSION }}.dmg
mv *.pkg stream-pi-server-macos-x64-${{ env.VERSION }}.pkg
mv *.pkg stream-pi-server-macos-x64-${{ env.VERSION }}.pkg
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 MacOS x64 DMG
- name: Saving MacOS x64 DMG
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: macos-dmg
name: macos-dmg
path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.dmg
path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.dmg
- name: Saving MacOS x64 PKG
- name: Saving MacOS x64 PKG
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: macos-pkg
name: macos-pkg
path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.pkg
path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.pkg
build-windows:
build-windows:
runs-on: windows-2019
runs-on: windows-2019
steps:
steps:
- 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: |
del src/main/resources/com/stream_pi/server/Default.zip
del 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: init.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: 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: Setup JavaFX
- name: Setup JavaFX
run: |
run: |
bitsadmin /Transfer DownsdfloadJavaFX https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+12_windows-x64_bin-jmods.zip D:\openjfx-17-ea+12_windows-x64_bin-jmods.zip
bitsadmin /Transfer DownsdfloadJavaFX https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+12_windows-x64_bin-jmods.zip D:\openjfx-17-ea+12_windows-x64_bin-jmods.zip
Expand-Archive -Force D:\openjfx-17-ea+12_windows-x64_bin-jmods.zip D:\
Expand-Archive -Force D:\openjfx-17-ea+12_windows-x64_bin-jmods.zip D:\
- 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: Create Bundle using JPackage
- name: Create Bundle using JPackage
id: project
id: project
shell: cmd
shell: cmd
run: |
run: |
call .github\scripts\jpackage.bat
call .github\scripts\jpackage.bat
env:
env:
MAIN_CLASS: com.stream_pi.server.Main
MAIN_CLASS: com.stream_pi.server.Main
JAVAFX_JMODS: D:\javafx-jmods-17\
JAVAFX_JMODS: D:\javafx-jmods-17\
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
JPACKAGE_HOME: ${{ env.JAVA_HOME }}
INSTALL_DIR: target/install
INSTALL_DIR: target/install
- name: Saving Windows x64 MSI
- name: Saving Windows x64 MSI
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: windows-msi
name: windows-msi
path: target/install/*.msi
path: target/install/*.msi