34 lines
747 B
YAML
34 lines
747 B
YAML
name: Maven CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build_and_test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: 11
|
|
distribution: 'adopt'
|
|
cache: gradle
|
|
|
|
- name: Build with Gradle
|
|
run: gradlew build
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Multiverse-Core-SNAPSHOT
|
|
# Can use build\/libs\/Multiverse-Core-(\d\.\d\.\d)(-SNAPSHOT|).jar if it ever supports regex
|
|
path: build/libs/**
|
|
# If there's nothing there then something must have gone awry
|
|
if-no-files-found: error
|