Skip to content

Commit

Permalink
ci: use GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Sep 13, 2023
1 parent 87fb580 commit 736ea83
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check

on:
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build and test with Gradle
run: ./gradlew clean check
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '*/build/test-results/*/*.xml'
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build and test with Gradle
env:
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }}
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}
run: ./gradlew clean check publishAllPublicationsToMavenRepository
# https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: '*/build/test-results/*/*.xml'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.settings/
.project
.classpath
.idea/
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -40,7 +40,7 @@ configure(srcProjects()) { project ->
url 'https://repo.osgeo.org/repository/release/'
}

jcenter()
mavenCentral()

// hale»studio artifacts
maven {
Expand All @@ -67,7 +67,7 @@ configure(javaProjects()) {
// package javadoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
from javadoc.destinationDir
classifier = 'javadoc'
archiveClassifier = 'javadoc'
}
}

Expand All @@ -78,7 +78,7 @@ configure(groovyProjects()) {
// package groovydoc into a jar file
task packageJavadoc(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
classifier = 'javadoc'
archiveClassifier = 'javadoc'
}
}

Expand All @@ -88,7 +88,7 @@ configure(srcProjects()) { project ->
// package source into a jar file
task packageSources(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

// define artifacts for upload
Expand Down

0 comments on commit 736ea83

Please sign in to comment.