Skip to content

Update build.yml

Update build.yml #102

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build and Package Drifty
on:
push:
branches: [ "master" ]
paths-ignore:
- "Website/**"
- "*.md"
- "*.txt"
pull_request:
branches: [ "master" ]
paths-ignore:
- "Website/**"
- "*.md"
- "*.txt"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
package-Drifty:
strategy:
matrix:
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20.0.1'
distribution: 'oracle'
cache: maven
- name: Build with Maven for ${{ matrix.os }}
run: mvn compile
- name: Package Drifty CLI for ${{ matrix.os }} with JavaPackager Maven plugin
run: mvn javapackager:package@bundling-Drifty-CLI-for-${{ matrix.os }}
- name: Package Drifty GUI for ${{ matrix.os }} with JavaPackager Maven plugin
run: mvn javapackager:package@bundling-Drifty-GUI-for-${{ matrix.os }}
- name: Push generated artifacts for ${{ matrix.os }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-Build-Files
path: target