server
Clone or download
Modified Files
name: Build Essential Actions
name: Initial Setup
on: [push]
on: [push]
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 unzip
run: sudo apt install unzip
- 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: Locally install util, action-api, theme-api
- name: Locally install util, action-api, theme-api
run: |
run: |
git clone https://github.com/stream-pi/util
git clone https://github.com/stream-pi/util
cd util
cd util
mvn clean install
mvn clean install
git clone https://github.com/stream-pi/theme-api
git clone https://github.com/stream-pi/theme-api
cd theme-api
cd theme-api
mvn clean install
mvn clean install
git clone https://github.com/stream-pi/action-api
git clone https://github.com/stream-pi/action-api
cd action-api
cd action-api
mvn clean install
mvn clean install
- name: Build actions
- name: Build actions
run: |
run: |
git clone https://github.com/stream-pi/essential-actions
git clone https://github.com/stream-pi/essential-actions
cd essential-actions
cd essential-actions
make build-all
make build-all
- name: Move actions to Default.zip
- name: Move actions to Default.zip
run: |
run: |
mv essential-actions/BuiltPlugins/ src/main/resources/com/stream_pi/server/
mv essential-actions/BuiltPlugins/ src/main/resources/com/stream_pi/server/
cd src/main/resources/com/stream_pi/server/
cd src/main/resources/com/stream_pi/server/
unzip Default.zip -d Default
unzip Default.zip -d Default
mv BuiltPlugins/* Default/Plugins/
mv BuiltPlugins/* Default/Plugins/
rm -r BuiltPlugins
rm -r BuiltPlugins
rm -rf Default.zip
rm -rf Default.zip
cd Default
cd Default
zip -r Default.zip *
zip -r Default.zip *
mv Default.zip ../
mv Default.zip ../
cd ../
cd ../
rm -r Default
rm -r Default
- name: Saving new Default.zip
- name: Saving new Default.zip
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: default-zip
name: default-zip
path: src/main/resources/com/stream_pi/server/Default.zip
path: src/main/resources/com/stream_pi/server/Default.zip
- name: Setup JavaFX
- name: Setup JavaFX
run: |
run: |
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+11_linux-x64_bin-sdk.zip
wget -P /tmp https://download2.gluonhq.com/openjfx/17/openjfx-17-ea+11_linux-x64_bin-sdk.zip
unzip /tmp/openjfx-17-ea+11_linux-x64_bin-sdk.zip -d /tmp
unzip /tmp/openjfx-17-ea+11_linux-x64_bin-sdk.zip -d /tmp
- name: Build Jars
- name: Build Jars
run: |
run: |
mvn -X package
mvn -X package
- name: Save built jars
- name: Save built jars
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: built-jars
name: built-jars
path: target/lib/*
path: target/lib/*
- name: Set Version
- name: Set Version
run: |
run: |
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Calculate required modules
- name: Calculate required modules
run: |
run: |
JDEPS_MODULES=$(jdeps --module-path $JAVAFX_SDK/:target/lib/ --print-module-deps --ignore-missing-deps target/lib/server-$VERSION.jar)
JDEPS_MODULES=$(jdeps --module-path $JAVAFX_SDK/:target/lib/ --print-module-deps --ignore-missing-deps target/lib/server-$VERSION.jar)
JAVAFX_MODULES=javafx.fxml,javafx.media,javafx.swing,javafx.web
JAVAFX_MODULES=javafx.fxml,javafx.media,javafx.swing,javafx.web
echo "REQ_MODULES=$JDEPS_MODULES,$JAVAFX_MODULES" >> $GITHUB_ENV
echo "REQ_MODULES=$JDEPS_MODULES,$JAVAFX_MODULES" >> $GITHUB_ENV
env:
env:
JAVAFX_SDK: /tmp/javafx-sdk-17/lib/
JAVAFX_SDK: /tmp/javafx-sdk-17/lib/
- name: Saving REQ_MODULES
- name: Saving REQ_MODULES
run: |
run: |
echo $REQ_MODULES > req_modules.txt
echo $REQ_MODULES > req_modules.txt
- name: Uploading REQ_MODULES
- name: Uploading REQ_MODULES
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: req_modules
name: req_modules
path: req_modules.txt
path: req_modules.txt
- name: Saving VERSION
- name: Saving VERSION
run: |
run: |
echo $VERSION > version.txt
echo $VERSION > version.txt
- name: Uploading VERSION
- name: Uploading VERSION
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2
with:
with:
name: version
name: version
path: version.txt
path: version.txt
name: Create Release
name: Release
on:
on:
workflow_run:
workflow_run:
workflows: ["Build Windows"]
workflows: ["Build Windows"]
types:
types:
- completed
- completed
jobs:
jobs:
build:
build:
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: Stream-Pi-Server ${{ env.VERSION }}
artifacts: target/install/*
artifacts: target/install/*
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
tag: ${{ env.VERSION }}