feat: do not enable gui if the environment is headless #158
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: Allay | |
on: | |
push: | |
branches: ["master"] | |
paths: | |
- .github/workflows/build.yml | |
- Allay-API/src/** | |
- Allay-Server/src/** | |
- Allay-Data/** | |
pull_request: | |
paths: | |
- .github/workflows/build.yml | |
- Allay-API/src/** | |
- Allay-Server/src/** | |
- Allay-Data/** | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# support for ipv6 | |
- name: Set up WARP | |
uses: fscarmen/[email protected] | |
if: contains(github.ref_name, 'master') | |
with: | |
stack: dual | |
- uses: actions/checkout@v4 | |
- run: chmod +x gradlew | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
- name: Build | |
uses: gradle/gradle-build-action@v3 | |
with: | |
gradle-version: wrapper | |
cache-overwrite-existing: true | |
cache-read-only: false | |
build-scan-publish: true | |
build-scan-terms-of-service-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-service-agree: "yes" | |
arguments: buildForGithubAction -p Allay-Server --scan | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
directory: .jacoco/test/ | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload Allay-API | |
uses: actions/upload-artifact@v4 | |
if: success() && contains(github.ref_name, 'master') | |
with: | |
name: Allay-API | |
path: Allay-API/build/libs/Allay-API-*.jar | |
- name: Upload Allay-Server | |
uses: actions/upload-artifact@v4 | |
if: success() && contains(github.ref_name, 'master') | |
with: | |
name: Allay-Server | |
path: Allay-Server/build/libs/Allay-Server-*-all.jar |