Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

GitHub Actions workflow for Gradle #38

Merged
merged 17 commits into from
Jul 23, 2024
Merged
Changes from 3 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
40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Main build

on:
workflow_dispatch:
pull_request:
branches: [main]

jobs:
build-gradle:
name: build and Test Gradle
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 6.9.2

- name: Test and Build Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
run: |
gradle check publish --scan \
-PsourceMaven=https://repo.maven.apache.org/maven2/ \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=https://maven.pkg.github.com/galasa-dev/gradle \
-PjacocoEnabled=true \
-PisMainOrRelease=true
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ group = "dev.galasa"
version = "0.33.0"

signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}

@@ -27,7 +31,7 @@ allprojects {
repositories {
mavenLocal()
maven {
url "https://development.galasa.dev/main/maven-repo/wrapping/"
url "https://maven.pkg.github.com/galasa-dev/wrapping/"
}
gradlePluginPortal()
mavenCentral()
@@ -91,15 +95,11 @@ publishing {

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('MAVENUSERNAME')
password System.getenv('MAVENPASSWORD')
username System.getenv("GITHUB_ACTOR")
password System.getenv("GITHUB_TOKEN")
}
}
}
}

}




}