server
Clone or download
Modified Files
set /p REQ_MODULES=<req_modules.txt
set /p REQ_MODULES=<req_modules.txt
set /p VERSION=<version.txt
set /p VERSION=<version.txt
%JPACKAGE_HOME%\bin\jpackage ^
%JPACKAGE_HOME%\bin\jpackage ^
--module-path %JAVAFX_JMODS%;target/lib/ ^
--module-path %JAVAFX_JMODS%;target/lib/ ^
--add-modules %REQ_MODULES% ^
--add-modules %REQ_MODULES% ^
--name "Stream-Pi Server" ^
--name "Stream-Pi Server" ^
--description "Stream-Pi Server" ^
--description "Stream-Pi Server" ^
--copyright "Copyright 2019-21 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones)" ^
--copyright "Copyright 2019-21 Debayan Sutradhar (rnayabed), Samuel Quiñones (SamuelQuinones)" ^
--input target/lib ^
--input target/lib ^
--main-jar server-%VERSION%.jar ^
--main-jar server-%VERSION%.jar ^
--type exe ^
--type exe ^
--java-options "-Dprism.verbose=true -Djavafx.verbose=true -Dprism.dirtyopts=false" ^
--java-options "-Dprism.verbose=true -Djavafx.verbose=true -Dprism.dirtyopts=false" ^
--main-class %MAIN_CLASS% ^
--main-class %MAIN_CLASS% ^
--arguments -DStream-Pi.startupRunnerFileName=run_min.exe ^
--arguments -DStream-Pi.startupRunnerFileName=run_min.exe ^
--add-launcher run_min=assets/run_min.properties ^
--add-launcher run_min=assets/run_min.properties ^
--icon assets/windows-icon.ico ^
--icon assets/windows-icon.ico ^
--dest %INSTALL_DIR% ^
--dest %INSTALL_DIR% ^
--win-dir-chooser ^
--win-dir-chooser ^
--win-menu ^
--win-menu ^
--win-menu-group "Stream-Pi" ^
--win-menu-group "Stream-Pi" ^
--license-file LICENSE.txt ^
--vendor "Stream-Pi"
--vendor "Stream-Pi"
echo Done now renaming ..
echo Done now renaming ..
cd %INSTALL_DIR%
cd %INSTALL_DIR%
echo run dir
echo run dir
dir
dir
ren *.exe stream-pi-server-windows-x64-%VERSION%-installer.exe
ren *.exe stream-pi-server-windows-x64-%VERSION%-installer.exe
dir
dir
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+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 \
--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
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+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 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 \
--type dmg
--type dmg
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
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
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+11_linux-x64_bin-jmods.zip D:\openjfx-17-ea+11_linux-x64_bin-jmods.zip
bitsadmin /Transfer DownsdfloadJavaFX https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+11_linux-x64_bin-jmods.zip D:\openjfx-17-ea+11_linux-x64_bin-jmods.zip
Expand-Archive -Force D:\openjfx-17-ea+11_linux-x64_bin-jmods.zip D:\
Expand-Archive -Force D:\openjfx-17-ea+11_linux-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 EXE
- name: Saving Windows x64 EXE
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: windows-exe
name: windows-exe
path: target/install/*.exe
path: target/install/*.exe
name: Release
name: Release
on:
on:
workflow_run:
workflow_run:
workflows: ["Build"]
workflows: ["Build"]
types:
types:
- completed
- completed
jobs:
jobs:
release:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-20.04
steps:
steps:
- 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: Download windows exe
- name: Download windows exe
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: windows.yml
workflow: windows.yml
name: windows-exe
name: windows-exe
path: target/install
path: target/install
- name: Download linux deb
- name: Download linux deb
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: linux.yml
workflow: linux.yml
name: linux-deb
name: linux-deb
path: target/install
path: target/install
- name: Download linux zip
- name: Download linux zip
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: linux.yml
workflow: linux.yml
name: linux-zip
name: linux-zip
path: target/install
path: target/install
- name: Download MacOS dmg
- name: Download MacOS dmg
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v2
with:
with:
workflow: macos.yml
workflow: macos.yml
name: macos-dmg
name: macos-dmg
path: target/install
path: target/install
- name: Delete old release if exists
- name: Delete old release if exists
uses: dev-drprasad/delete-tag-and-release@v0.2.0
uses: dev-drprasad/delete-tag-and-release@v0.2.0
continue-on-error: true
continue-on-error: true
with:
with:
delete_release: true
delete_release: true
tag_name: ${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
env:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release nightly build
- name: Release nightly build
uses: ncipollo/release-action@v1.8.6
uses: ncipollo/release-action@v1.8.6
with:
with:
allowUpdates: true
allowUpdates: true
name: Stream-Pi-Server ${{ env.VERSION }}
name: ${{ env.VERSION }}
artifacts: target/install/*
artifacts: target/install/*
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
tag: ${{ env.VERSION }}