G-Earth/.github/workflows/build.yml
2024-06-25 04:55:13 +02:00

75 lines
1.6 KiB
YAML

name: Build G-Earth
on:
push:
paths:
- '.github/workflows/**'
- 'G-Earth/**'
- 'pom.xml'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout G-Earth
uses: actions/checkout@v4
- name: Checkout G-Wasm
uses: actions/checkout@v4
with:
repository: sirjonasxx/G-Wasm
path: gwasm
ref: minimal
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
java-package: jdk+fx
distribution: 'liberica'
- name: Install G-Wasm
working-directory: gwasm
run: mvn -B install
# Check if GITHUB_REF_TYPE is a tag
- name: Build G-Earth
run: |
if [[ $GITHUB_REF_TYPE == 'tag' ]]; then
mvn -B package -Drepository=${GITHUB_REPOSITORY} -Dchangelist=
else
mvn -B package -Drepository=${GITHUB_REPOSITORY}
fi
- name: Upload Mac OSX
uses: actions/upload-artifact@v4
with:
name: Mac OSX
path: Build/Mac/*
retention-days: 7
- name: Upload Linux
uses: actions/upload-artifact@v4
with:
name: Linux
path: Build/Linux/*
retention-days: 7
- name: Upload Windows x32
uses: actions/upload-artifact@v4
with:
name: Windows x32
path: Build/Windows_32bit/*
retention-days: 7
- name: Upload Windows x64
uses: actions/upload-artifact@v4
with:
name: Windows x64
path: Build/Windows_64bit/*
retention-days: 7