更新 pom.xml #18
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: Linux | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout your code | |
- uses: actions/checkout@v4 | |
# 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 }} | |
# Install extra required packaged on top of ubuntu-latest | |
- name: Install libraries | |
run: sudo apt install libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libgl-dev libgtk-3-dev libpango1.0-dev libxtst-dev | |
# Create a staging directory where the binary will be copied into | |
- name: Make staging directory | |
run: mkdir staging | |
# 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 Linux) itself. | |
- name: Gluon Build | |
run: mvn -Pdesktop gluonfx:build gluonfx:package | |
# Copy the native binary to the staging directory | |
- name: Copy native image to staging | |
run: cp -r target/gluonfx/x86_64-linux/CaiDanCi 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: Package | |
path: staging |