Dump travis, embrace github actions

This commit is contained in:
Sollace 2022-11-11 23:48:15 +01:00
parent 0720038dcc
commit e7e5f10eb9
4 changed files with 65 additions and 19 deletions

19
.github/workflows/gradle-build.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Build on Push
on:
- push
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check

19
.github/workflows/gradle-check.yml vendored Normal file
View file

@ -0,0 +1,19 @@
name: Build on Pull Request
on:
- pull_request
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Build Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check

27
.github/workflows/gradle-publish.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Publish
on:
push:
tags:
- '*'
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
with:
submodules: recursive
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Publish Maven Jar
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eskatos/gradle-command-action@v1
with:
arguments: build publish

View file

@ -1,19 +0,0 @@
language: java
jdk:
- openjdk8
jobs:
include:
- stage: init
script: ./gradlew setupCIWorkspace
- stage: check
script: ./gradlew check
- stage: publish
script: ./gradlew build publish
stages:
- name: init
- name: check
if: type IN (pull_request)
- name: publish
if: NOT type IN (pull_request)