mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- github-actions
|
|
tags:
|
|
- '[0-9]*'
|
|
pull_request:
|
|
branches:
|
|
- github-actions
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
# test against
|
|
# - Java 1.8 (minimum requirement)
|
|
# - Java 9 (first version with JPMS)
|
|
# - Java LTS versions (11, 17, ...)
|
|
# - lastest Java version(s)
|
|
java:
|
|
- 1.8
|
|
- 9
|
|
- 14
|
|
- 15
|
|
- 11 # always last because used to build snapshots and releases
|
|
|
|
steps:
|
|
|
|
- name: info
|
|
run: |
|
|
echo ${{ matrix.java }}
|
|
echo ${{ github.event_name }}
|
|
echo ${{ github.ref }}
|
|
echo ${{ github.repository }}
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Java ${{ matrix.java }}
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: ${{ matrix.java }}
|
|
|
|
- name: Cache Gradle wrapper
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
|
|
|
- name: Cache Gradle cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
|
|
restore-keys: ${{ runner.os }}-gradle
|
|
|
|
- name: Build with Gradle
|
|
run: echo ./gradlew build
|
|
|
|
- name: Publish snapshot to oss.jfrog.org
|
|
run: echo ./gradlew artifactoryPublish
|
|
if: |
|
|
matrix.java == '11' &&
|
|
github.event_name == 'push' &&
|
|
github.ref == 'refs/heads/github-actions' &&
|
|
github.repository == 'JFormDesigner/FlatLaf'
|
|
|
|
- name: Release a new stable version to bintray
|
|
run: echo ./gradlew bintrayUpload -Drelease=true
|
|
if: |
|
|
matrix.java == '11' &&
|
|
github.event_name == 'push' &&
|
|
startsWith( github.ref, 'refs/tags/' ) &&
|
|
github.repository == 'JFormDesigner/FlatLaf'
|