Skip to content

Commit

Permalink
Simplify Github WorkFlows
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph T. McQuigg <[email protected]>
  • Loading branch information
JT122406 committed Dec 24, 2024
1 parent 217fd60 commit 912ab0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/gradle-pr-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Gradle for Pull Request

on:
pull-request:
pull_request:
branches:
- 1.21.1
- 1.20.1
Expand All @@ -12,10 +12,8 @@ on:

jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
Expand All @@ -25,11 +23,8 @@ jobs:
java-version: 21
cache: gradle

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

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Execute Gradle build
run: ./gradlew build --scan
run: ./gradlew build --scan
20 changes: 6 additions & 14 deletions .github/workflows/gradle-publishtomaven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ on:

jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
Expand All @@ -22,20 +20,14 @@ jobs:
java-version: 21
cache: gradle

- name: Store gradle.properties secrets
env:
MAVEN_REPO_PROPERTIES: ${{ secrets.REPO_LOGIN }}
shell: bash
- name: Configure Gradle secrets
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "${MAVEN_REPO_PROPERTIES}" > ~/.gradle/gradle.properties
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
echo "${{ secrets.REPO_LOGIN }}" > ~/.gradle/gradle.properties
- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Execute Gradle build and Publish to Maven
run: ./gradlew publish publishAllPublicationsToJTDev-Maven-RepositoryRepository
- name: Build and Publish to Maven
run: ./gradlew publish publishAllPublicationsToJTDev-Maven-RepositoryRepository

0 comments on commit 912ab0b

Please sign in to comment.