Progression: Fix soundsets #187
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: "Build-Windows-Staging" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
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 | |
# Setup the Windows build environment | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- 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 -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: Copy Project Readme | |
run: cp -r README.md staging | |
# Upload the staging directory as a build artifact. You will be able to download this after the build finishes. | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{env.ARCHIVE_NAME}} | |
path: staging | |
retention-days: 7 |