server
Clone or download
Modified Files
name: Build MacOS
name: Build MacOS
on:
on:
workflow_run:
workflow_run:
workflows: ["Build Linux"]
workflows: ["Build Linux"]
types:
types:
- completed
- completed
jobs:
jobs:
build:
build:
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: 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 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
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