Skip to content

Commit

Permalink
Move to GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
deepy committed Feb 25, 2024
1 parent ae6e7f0 commit cc48611
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 10 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build

on:
push:
branches: [ "master", "github-ci" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: '1.8'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build

dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '1.8'
distribution: 'temurin'

- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@ artifacts {
archives javadocJar, sourcesJar
}

signing {
required { System.getenv("CI") }
useGpgCmd()
sign configurations.archives
if (System.getenv("CI") != null) {
signing {
required { true }
useGpgCmd()
sign configurations.archives
}
}

def ossrhUsername = System.getenv("OSSRH_USER") ?: ""
def ossrhPassword = System.getenv("OSSRH_PASSWORD") ?: ""

uploadArchives {
repositories {
mavenDeployer {
Expand Down Expand Up @@ -105,7 +110,7 @@ dependencies {
compile gradleApi()
compile localGroovy()

testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
testCompile "org.hamcrest:hamcrest-core:1.3"
testImplementation(platform("org.junit:junit-bom:5.6.2"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
Expand Down
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ group=com.gradleup
# JDK config
sourceCompatibility=1.8
targetCompatibility=1.8

# Dependencies
hamcrestVersion=1.3
junitVersion=4.12
testNgVersion=6.10

0 comments on commit cc48611

Please sign in to comment.