Build artifacts after push to main #8
Workflow file for this run
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 Linux Binary | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-linux-binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 22 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '22' | |
distribution: 'liberica' | |
cache: maven | |
- name: Extract version from Maven cache | |
id: get-version | |
run: | | |
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \ | |
-Dexpression=project.version -q -DforceStdout --file tcMenuGenerator/pom.xml) | |
echo "version=$version" >> $GITHUB_ENV | |
- name: Build tcMenuGenerator binary | |
run: | | |
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuJavaApi/pom.xml | |
mvn -B install -DskipTests -Dgpg.skip=true --file embedCONTROLCore/pom.xml | |
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuGenerator/pom.xml | |
cd tcMenuGenerator/target | |
cp classes/img/tcMenuDesigner.ico . | |
jpackage -n tcMenuDesigner \ | |
-p jfx/deps \ | |
--input jfx/app \ | |
--icon ./classes/img/menu-icon.png \ | |
--verbose \ | |
--license-file ../../LICENSE \ | |
--linux-app-category Development \ | |
--linux-menu-group "Development;Utility;" \ | |
--java-options "-Dprism.lcdtext=false -Djava.library.path=$APPDIR/lin" \ | |
--app-version ${{ env.version }} \ | |
--add-modules "jdk.crypto.cryptoki" \ | |
-m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd | |
- name: Upload DEB artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: tcmenudesigner_${{ env.version }}_linux_deb-${{ github.sha }} | |
path: | | |
tcMenuGenerator/target/tcmenudesigner_${{ env.version }}_amd64.deb |