From: Debayan Sutradhar Date: Sat, 19 Jun 2021 01:08:18 +0530 Subject: Merge pull request #65 from stream-pi/rnayabed-patch-1 --- Merge pull request #65 from stream-pi/rnayabed-patch-1 Rnayabed patch 1 --- --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,204 @@ +name: Build +on: + workflow_run: + workflows: ["Initial Setup"] + types: + - completed + +jobs: + build-linux: + runs-on: ubuntu-20.04 + steps: + - 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 + - uses: actions/checkout@v2 + - name: Setup java + uses: joschi/setup-jdk@v2 + with: + java-version: 16 + - name: Delete Default.zip + run: | + rm -rf src/main/resources/com/stream_pi/server/Default.zip + - name: Downloading Default.zip ... + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: default-zip + path: src/main/resources/com/stream_pi/server + - name: Setup JavaFX + run: | + 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 + - name: Download built jars + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: built-jars + path: target/lib/ + - name: Download REQ_MODULES + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: req_modules + - name: Download VERSION + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: version + - name: Add VERSION to environment + run: | + echo "VERSION=$(> $GITHUB_ENV + - name: Add REQ_MODULES to environment + run: | + echo "REQ_MODULES=$(> $GITHUB_ENV + - name: Create Bundle using JPackage + run: | + # Create DEB + .github/scripts/jpackage.sh \ + --icon assets/linux-icon.png \ + --app-version ${{ env.VERSION }} \ + --linux-menu-group "Stream-Pi" \ + --license-file LICENSE.txt \ + --type deb + + # Create App Image + .github/scripts/jpackage.sh \ + --icon assets/linux-icon.png \ + --app-version ${{ env.VERSION }} \ + --type app-image + + cd $INSTALL_DIR + mv *.deb stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb + 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 }} + rm -r stream-pi-server-${{ env.VERSION }} + env: + MAIN_CLASS: com.stream_pi.server.Main + JAVAFX_JMODS: /tmp/javafx-jmods-17/ + JPACKAGE_HOME: ${{ env.JAVA_HOME }} + INSTALL_DIR: target/install + - name: Saving Linux x64 DEB + uses: actions/upload-artifact@v2 + with: + name: linux-deb + path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb + - name: Saving Linux x64 ZIP + uses: actions/upload-artifact@v2 + with: + name: linux-zip + path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip + build-macos: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - name: Setup java + uses: joschi/setup-jdk@v2 + with: + java-version: 16 + - name: Delete Default.zip + run: | + rm -rf src/main/resources/com/stream_pi/server/Default.zip + - name: Downloading Default.zip ... + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: default-zip + path: src/main/resources/com/stream_pi/server + - name: Setup JavaFX + run: | + 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 + - name: Download built jars + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: built-jars + path: target/lib/ + - name: Download REQ_MODULES + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: req_modules + - name: Download VERSION + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: version + - name: Add VERSION to environment + run: | + echo "VERSION=$(> $GITHUB_ENV + - name: Add REQ_MODULES to environment + run: | + echo "REQ_MODULES=$(> $GITHUB_ENV + - name: Create Bundle using JPackage + run: | + # Create DMG + .github/scripts/jpackage.sh \ + --icon assets/macos-icon.icns \ + --license-file LICENSE.txt \ + --type dmg + cd $INSTALL_DIR + mv *.dmg stream-pi-server-macos-x64-${{ env.VERSION }}.dmg + env: + MAIN_CLASS: com.stream_pi.server.Main + JAVAFX_JMODS: /tmp/javafx-jmods-17/ + JPACKAGE_HOME: ${{ env.JAVA_HOME }} + INSTALL_DIR: target/install + - name: Saving MacOS x64 DMG + uses: actions/upload-artifact@v2 + with: + name: macos-dmg + path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.dmg + + build-windows: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + - name: Setup java + uses: joschi/setup-jdk@v2 + with: + java-version: 16 + - name: Delete Default.zip + run: | + del src/main/resources/com/stream_pi/server/Default.zip + - name: Downloading Default.zip ... + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: default-zip + path: src/main/resources/com/stream_pi/server + - name: Download REQ_MODULES + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: req_modules + - name: Download VERSION + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: version + - name: Setup JavaFX + 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 + Expand-Archive -Force D:\openjfx-17-ea+11_linux-x64_bin-jmods.zip D:\ + - name: Download built jars + uses: dawidd6/action-download-artifact@v2 + with: + workflow: init.yml + name: built-jars + path: target/lib/ + - name: Create Bundle using JPackage + id: project + shell: cmd + run: | + call .github\scripts\jpackage.bat + env: + MAIN_CLASS: com.stream_pi.server.Main + JAVAFX_JMODS: D:\javafx-jmods-17\ + JPACKAGE_HOME: ${{ env.JAVA_HOME }} + INSTALL_DIR: target/install + - name: Saving Windows x64 EXE + uses: actions/upload-artifact@v2 + with: + name: windows-exe + path: target/install/*.exe --- 'a/.github/workflows/linux.yml' +++ /dev/null @@ -1,90 +0,0 @@ -name: Build Linux -on: - workflow_run: - workflows: ["Initial Setup"] - types: - - completed - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - 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 - - uses: actions/checkout@v2 - - name: Setup java - uses: joschi/setup-jdk@v2 - with: - java-version: 16 - - name: Delete Default.zip - run: | - rm -rf src/main/resources/com/stream_pi/server/Default.zip - - name: Downloading Default.zip ... - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: default-zip - path: src/main/resources/com/stream_pi/server - - name: Setup JavaFX - run: | - 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 - - name: Download built jars - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: built-jars - path: target/lib/ - - name: Download REQ_MODULES - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: req_modules - - name: Download VERSION - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: version - - name: Add VERSION to environment - run: | - echo "VERSION=$(> $GITHUB_ENV - - name: Add REQ_MODULES to environment - run: | - echo "REQ_MODULES=$(> $GITHUB_ENV - - name: Create Bundle using JPackage - run: | - # Create DEB - .github/scripts/jpackage.sh \ - --icon assets/linux-icon.png \ - --app-version ${{ env.VERSION }} \ - --linux-menu-group "Stream-Pi" \ - --license-file LICENSE.txt \ - --type deb - - # Create App Image - .github/scripts/jpackage.sh \ - --icon assets/linux-icon.png \ - --app-version ${{ env.VERSION }} \ - --type app-image - - cd $INSTALL_DIR - mv *.deb stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb - 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 }} - rm -r stream-pi-server-${{ env.VERSION }} - env: - MAIN_CLASS: com.stream_pi.server.Main - JAVAFX_JMODS: /tmp/javafx-jmods-17/ - JPACKAGE_HOME: ${{ env.JAVA_HOME }} - INSTALL_DIR: target/install - - name: Saving Linux x64 DEB - uses: actions/upload-artifact@v2 - with: - name: linux-deb - path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-debian.deb - - name: Saving Linux x64 ZIP - uses: actions/upload-artifact@v2 - with: - name: linux-zip - path: target/install/stream-pi-server-linux-x64-${{ env.VERSION }}-executable.zip - --- 'a/.github/workflows/macos.yml' +++ /dev/null @@ -1,72 +0,0 @@ -name: Build MacOS -on: - workflow_run: - workflows: ["Build Linux"] - types: - - completed - -jobs: - build: - runs-on: macos-10.15 - steps: - - uses: actions/checkout@v2 - - name: Setup java - uses: joschi/setup-jdk@v2 - with: - java-version: 16 - - name: Delete Default.zip - run: | - rm -rf src/main/resources/com/stream_pi/server/Default.zip - - name: Downloading Default.zip ... - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: default-zip - path: src/main/resources/com/stream_pi/server - - name: Setup JavaFX - run: | - 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 - - name: Download built jars - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: built-jars - path: target/lib/ - - name: Download REQ_MODULES - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: req_modules - - name: Download VERSION - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: version - - name: Add VERSION to environment - run: | - echo "VERSION=$(> $GITHUB_ENV - - name: Add REQ_MODULES to environment - run: | - echo "REQ_MODULES=$(> $GITHUB_ENV - - name: Create Bundle using JPackage - run: | - # Create DMG - .github/scripts/jpackage.sh \ - --icon assets/macos-icon.icns \ - --license-file LICENSE.txt \ - --type dmg - - cd $INSTALL_DIR - mv *.dmg stream-pi-server-macos-x64-${{ env.VERSION }}.dmg - env: - MAIN_CLASS: com.stream_pi.server.Main - JAVAFX_JMODS: /tmp/javafx-jmods-17/ - JPACKAGE_HOME: ${{ env.JAVA_HOME }} - INSTALL_DIR: target/install - - name: Saving MacOS x64 DMG - uses: actions/upload-artifact@v2 - with: - name: macos-dmg - path: target/install/stream-pi-server-macos-x64-${{ env.VERSION }}.dmg - --- 'a/.github/workflows/release.yml' +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: workflow_run: - workflows: ["Build Windows"] + workflows: ["Build"] types: - completed --- 'a/.github/workflows/windows.yml' +++ /dev/null @@ -1,61 +0,0 @@ -name: Build Windows -on: - workflow_run: - workflows: ["Build MacOS"] - types: - - completed - -jobs: - build: - runs-on: windows-2019 - steps: - - uses: actions/checkout@v2 - - name: Setup java - uses: joschi/setup-jdk@v2 - with: - java-version: 16 - - name: Delete Default.zip - run: | - del src/main/resources/com/stream_pi/server/Default.zip - - name: Downloading Default.zip ... - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: default-zip - path: src/main/resources/com/stream_pi/server - - name: Download REQ_MODULES - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: req_modules - - name: Download VERSION - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: version - - name: Setup JavaFX - 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 - Expand-Archive -Force D:\openjfx-17-ea+11_linux-x64_bin-jmods.zip D:\ - - name: Download built jars - uses: dawidd6/action-download-artifact@v2 - with: - workflow: init.yml - name: built-jars - path: target/lib/ - - name: Create Bundle using JPackage - id: project - shell: cmd - run: | - call .github\scripts\jpackage.bat - env: - MAIN_CLASS: com.stream_pi.server.Main - JAVAFX_JMODS: D:\javafx-jmods-17\ - JPACKAGE_HOME: ${{ env.JAVA_HOME }} - INSTALL_DIR: target/install - - name: Saving Windows x64 EXE - uses: actions/upload-artifact@v2 - with: - name: windows-exe - path: target/install/*.exe -