Run Linux Build (deb, rpm, jar) #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Run Linux Build (deb, rpm, jar)" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Mostly just the version folder it will be uploaded to." | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
STYX_BASEURL: ${{ secrets.STYX_BASEURL }} | |
STYX_IMAGEURL: ${{ secrets.STYX_IMAGEURL }} | |
STYX_SITEURL: ${{ secrets.STYX_SITEURL }} | |
STYX_APP_GUID: ${{ secrets.STYX_APP_GUID }} | |
STYX_SECRET: ${{ secrets.STYX_SECRET }} | |
STYX_DISCORDCLIENT: ${{ secrets.STYX_DISCORDCLIENT }} | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v4 | |
- name: "Setup JDK" | |
id: java | |
uses: gmitch215/setup-java@main | |
with: | |
distribution: jetbrains | |
java-version: 17 | |
java-package: jdk | |
cache: "gradle" | |
- name: Setup Ruby (for fpm) | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: Install fpm and bsdtar | |
run: | | |
gem install fpm | |
sudo apt install -y libarchive-tools | |
- name: "Build UberJar, RPM, DEB & PKG (for Arch)" | |
env: | |
JAVA_HOME: ${{ steps.java.outputs.path }} | |
run: | | |
chmod u+x ./gradlew | |
./gradlew packageLinuxInstallers | |
- name: "Print and save sha384 for binaries" | |
run: find ./build/compose -type f \( -iname Styx\*linux\*.jar -o -iname \*.deb -o -iname \*.rpm -o -iname \*.pkg.tar.zst \) -exec shasum -a 384 {} \; | tee checksums.sha384 | |
- name: "Upload checksum file" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: checksums.sha384 | |
path: checksums.sha384 | |
- name: "Upload installers to FTP" | |
uses: "SamKirkland/[email protected]" | |
with: | |
server: ${{ secrets.FTP_HOST }} | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
protocol: ftps | |
security: loose | |
local-dir: "./build/compose/binaries/installers/" | |
server-dir: "/${{ inputs.version }}/linux/binaries/" | |
- name: "Upload jars to FTP" | |
uses: "SamKirkland/[email protected]" | |
with: | |
server: ${{ secrets.FTP_HOST }} | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
protocol: ftps | |
security: loose | |
local-dir: "./build/compose/jars/" | |
server-dir: "/${{ inputs.version }}/linux/jars/" |