Skip to content

Commit 802a08e

Browse files
committed
Build artefacts after push to main
1 parent 84a403b commit 802a08e

File tree

3 files changed

+63
-6
lines changed

3 files changed

+63
-6
lines changed

.github/workflows/build_linux.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build Linux Binary
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build-linux-binary:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up JDK 22
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '22'
21+
distribution: 'liberica'
22+
cache: maven
23+
24+
- name: Extract version from Maven cache
25+
id: get-version
26+
run: |
27+
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
28+
-Dexpression=project.version -q -DforceStdout --file tcMenuGenerator/pom.xml)
29+
echo "version=$version" >> $GITHUB_ENV
30+
31+
- name: Build tcMenuGenerator binary
32+
run: |
33+
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuJavaApi/pom.xml
34+
mvn -B install -DskipTests -Dgpg.skip=true --file embedCONTROLCore/pom.xml
35+
mvn -B install -DskipTests -Dgpg.skip=true --file tcMenuGenerator/pom.xml
36+
cd tcMenuGenerator/target
37+
cp classes/img/tcMenuDesigner.ico .
38+
jpackage -n tcMenuDesigner \
39+
-p jfx/deps \
40+
--input jfx/app \
41+
--icon ./classes/img/menu-icon.png \
42+
--verbose \
43+
--license-file ../../LICENSE \
44+
--linux-app-category Development \
45+
--linux-menu-group "Development;Utility;" \
46+
--java-options "-Dprism.lcdtext=false -Djava.library.path=$APPDIR/lin" \
47+
--app-version ${{ env.version }} \
48+
--add-modules "jdk.crypto.cryptoki" \
49+
-m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
50+
51+
- name: Upload DEB artifact
52+
uses: actions/upload-artifact@v3
53+
with:
54+
name: tcmenudesigner_${{ env.version }}_linux_deb-${{ github.sha }}
55+
path: |
56+
tcMenuGenerator/target/tcmenudesigner_${{ env.version }}_amd64.deb
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Build
1+
name: Test
22

33
on:
44
push:
55
pull_request:
66
branches: [ "main" ]
77

88
jobs:
9-
build:
9+
test:
1010

1111
runs-on: ubuntu-latest
1212

@@ -19,11 +19,11 @@ jobs:
1919
distribution: 'liberica'
2020
cache: maven
2121

22-
- name: Build tcMenuJavaApi
22+
- name: Build and test tcMenuJavaApi
2323
run: mvn -B install -Dgpg.skip=true --file tcMenuJavaApi/pom.xml
2424

25-
- name: Build embedCONTROLCore
25+
- name: Build and test embedCONTROLCore
2626
run: mvn -B install -Dgpg.skip=true --file embedCONTROLCore/pom.xml
2727

28-
- name: Build tcMenuGenerator
28+
- name: Build and test tcMenuGenerator
2929
run: mvn -B install -Dgpg.skip=true --file tcMenuGenerator/pom.xml

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## tcMenu - A menu library and designer for Arduino and mbed with IoT capabilities
2-
[![Java Build](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/build.yml)
2+
[![Java Test](https://github.com/TcMenu/tcMenu/actions/workflows/test.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/test.yml)
3+
[![Linux Build](https://github.com/TcMenu/tcMenu/actions/workflows/build_linux.yml/badge.svg)](https://github.com/TcMenu/tcMenu/actions/workflows/build_linux.yml)
34
[![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/TcMenu/tcMenu/blob/main/LICENSE)
45
[![GitHub release](https://img.shields.io/github/release/TcMenu/tcMenu.svg?maxAge=3600)](https://github.com/TcMenu/tcMenu/releases)
56
[![davetcc](https://img.shields.io/badge/davetcc-dev-blue.svg)](https://github.com/davetcc)

0 commit comments

Comments
 (0)