From a4c8f7f1600f24d02726b5037d102a6a78aed13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delorme?= Date: Sun, 11 Feb 2024 14:01:16 +0100 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 55 +++++++++++++++---------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7898ce9..da0be6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,39 +1,28 @@ -name: Github Actions Java Build +name: Building the Java project with customscript +run-name: ${{ github.actor }} is testing out Gitea Actions 🚀 on: [push] jobs: - Build-Karma-Project: + Build-Java-Project: runs-on: ubuntu-latest steps: - - uses: https://github.com/actions/checkout@v4.1.1 -# - uses: https://github.com/actions/setup-java@v3 -# with: -# distribution: "zulu" # See 'Supported distributions' for available options -# java-version: "20" -# cache: 'maven' - - name: Build project with Maven and Xvfb + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: "zulu" # See 'Supported distributions' for available options + java-version: "21" + - name: Build project with custom script and Xvfb run: | - apt update -y - apt -y install xvfb curl zip unzip xsltproc - export DISPLAY=":99.0" - export AUDIODEV=null - xvfb-run :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - curl -s "https://get.sdkman.io" | bash - source "/root/.sdkman/bin/sdkman-init.sh" - sdk env install - sdk env use - chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh" - #/root/.sdkman/candidates/maven/current/mvn -B package -DskipTests=true --file pom.xml - chmod +x ./build.sh - ./build.sh a -# - uses: https://gitea.com/actions/release-action@main -# with: -# files: |- -# target/*.jar -# target/buid/*.run -# api_key: "${{secrets.RELEASE_TOKEN}}" -# use of upload artifacts : https://github.com/actions/upload-artifact -# - uses: actions/upload-artifact@v3 -# with: -# name: Karma -# path: target/Karma-*.jar + apt update -y + apt -y install xvfb curl zip unzip xsltproc + export DISPLAY=":99.0" + export AUDIODEV=null + xvfb-run :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + curl -s "https://get.sdkman.io" | bash + source "/root/.sdkman/bin/sdkman-init.sh" + sdk env install + sdk env use + chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh" + #/root/.sdkman/candidates/maven/current/mvn -B package -DskipTests=true --file pom.xml + chmod +x ./build.sh + ./build.sh a