Skip to content

Run Windows Build (msi, jar) #24

Run Windows Build (msi, jar)

Run Windows Build (msi, jar) #24

Workflow file for this run

name: "Run Windows Build (msi, 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: windows-latest
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: actions/setup-java@v4
with:
distribution: "temurin"
java-version: |
11
17
cache: "gradle"
- name: "Build Msi"
env:
JAVA_HOME: ${{ steps.java.outputs.path }}
run: ./gradlew.bat packageReleaseMsi
- name: "Build Uber jar"
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
run: ./gradlew.bat packageReleaseUberJarForCurrentOS
- name: "Print and save sha384 for binaries"
shell: pwsh
run: |
Get-ChildItem -Path .\build\compose -Recurse -File -Include Styx*windows*.jar,*.msi | ForEach-Object {
$hash = Get-FileHash -Path $_.FullName -Algorithm SHA384
"$($hash.Hash) $($_.Name)"
} | Tee-Object -FilePath checksums.sha384
- name: "Upload checksum file"
uses: actions/upload-artifact@v4
with:
name: checksums.sha384
path: checksums.sha384
- name: "Upload binaries 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/main-release/"
server-dir: "/${{ inputs.version }}/win/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 }}/win/jars/"