Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GHA for CI builds #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/gyro-doclet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: gyro-doclet

on:
push:
branches:
- master
- release/*
tags:
- release/*

pull_request:
branches:
- master
- release/*

env:
GITHUB_ACTIONS_PULL_REQUEST: ${{ github.event.pull_request.number }}
GRADLE_DEPLOY_USER: ${{ secrets.GRADLE_DEPLOY_USER }}
GRADLE_DEPLOY_PASSWORD: ${{ secrets.GRADLE_DEPLOY_PASSWORD }}

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ plugins {
id 'checkstyle'
}

def releaseVersion = '1.0.1'
def releaseVersion = '1.1.0'
def releaseBuild = false;

defaultTasks 'shadowJar'

if (System.getenv('TRAVIS_BRANCH') && System.getenv('TRAVIS_PULL_REQUEST') == 'false') {
if (System.getenv('CI')) {
defaultTasks 'build', 'publish'
check.dependsOn 'publish'
publish.dependsOn 'shadowJar'
releaseBuild = System.getenv('TRAVIS_BRANCH').startsWith("release/");

releaseBuild = System.getenv('GITHUB_ACTIONS_PULL_REQUEST') == '' &&
System.getenv('GITHUB_REF').startsWith("refs/head/release/");
} else {
defaultTasks 'build', 'publishToMavenLocal'
check.dependsOn 'publishToMavenLocal'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gyro/doclet/ResourceDocGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ private String addValidationAnnotationMessage(MethodDoc methodDoc, String commen
// Replace last "," with an "or"
if (validNumberList.size() > 1) {
validNumber = String.format(
"Valid values are ``%s %s%s`.",
"Valid values are ``%s %s%s``.",
validNumber.substring(0, validNumber.lastIndexOf(",")),
(isCollection ? "and" : "or"),
validNumber.substring(validNumber.lastIndexOf(",") + 1));
Expand Down
Loading