Skip to content

PackageBuilder: Filter skies for PWAD Mode #5

PackageBuilder: Filter skies for PWAD Mode

PackageBuilder: Filter skies for PWAD Mode #5

# Lazy method until I add workflow runners
name: "Build-Windows-Release"
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}
steps:
# Checkout your code
- name: Checkout
uses: actions/checkout@v4.1.0
with:
fetch-depth: 0
persist-credentials: false
# Setup the Windows build environment
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
- name: Visual Studio shell
uses: egor-tensin/vs-shell@v2
# Make sure the latest GraalVM is installed.
# after this step env.JAVA_HOME and env.GRAALVM_HOME will point to the GraalVM location
- name: Setup GraalVM built by Gluon
uses: gluonhq/setup-graalvm@master
# set GITHUB_TOKEN to avoid exceeding GitHub's API rate limit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create a staging directory where the binary will be copied into
- name: Setup directories
run: mkdir staging && mkdir staging/licenses
# Install the Gluon License (optional)
# Using this step requires you to set a GLUON_LICENSE secret in the secret configuration of your repo. Have a look at https://gluonhq.com/products/mobile/buy for more information about obtaining a license.
- name: Gluon License
uses: gluonhq/gluon-build-license@v1
with:
gluon-license: ${{ secrets.GLUON_LICENSE }}
# Build your project using Maven
# The desktop profile is used, which means a native build will be created for the host platform (in this case Windows) itself.
- name: Gluon Build with Git-Commit-ID
shell: cmd
run: .\mvnw -Pdesktop git-commit-id:revision gluonfx:build
# Copy the native binary to the staging directory
- name: Copy native image to staging
run: cp -r target/gluonfx/x86_64-windows/HXDD.exe staging
# Copy the hxdd resources to the staging directory
- name: Compress HXDD Resources
shell: pwsh
run: Compress-Archive -CompressionLevel "Optimal" -Path resources/* -DestinationPath staging/resources.zip
#- name: Copy resources to staging
# run: cp -r target/resources.zip staging
# Copy supporting files for HXDD executable from graalvm to the staging directory
- name: Copy supporting GRAALVM dlls to staging
run: cp -r ${env:GRAALVM_HOME}/bin/awt.dll staging &&
cp -r ${env:GRAALVM_HOME}/bin/java.dll staging &&
cp -r ${env:GRAALVM_HOME}/bin/server/jvm.dll staging &&
cp -r ${env:GRAALVM_HOME}/bin/windowsaccessbridge-64.dll staging
- name: Copy Licenses
shell: pwsh
run: Copy-Item -Path licenses/* -Destination staging/licenses -PassThru
- name: Copy Project License
run: cp -r LICENSE.md staging
- name: Prepare Release
shell: pwsh
run: Compress-Archive -CompressionLevel "Optimal" -Path staging/* -DestinationPath ${{env.ARCHIVE_NAME}}.zip
# Upload as release, generate notes, and mark as draft for manual release
- name: Upload Release
uses: ncipollo/release-action@v1.13.0
with:
name: ${{env.ARCHIVE_NAME}}
artifacts: ${{env.ARCHIVE_NAME}}.zip
artifactContentType: application/zip
generateReleaseNotes: true
draft: true