Skip to content

Commit

Permalink
Update the CI build to follow the patterns used in other repos
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGregory084 authored Dec 20, 2024
1 parent a0f2a60 commit bcfcf4a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: CI

on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches:
- main

env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
Expand Down Expand Up @@ -38,10 +44,11 @@ jobs:
java-version: 11
jdkFile: ${{ steps.download-java.outputs.jdkFile }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build & Test
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
with:
arguments: build
run: ./gradlew build --info

- name: Publish Test Results
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
Expand All @@ -52,9 +59,7 @@ jobs:

- name: Publish To Sonatype
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
with:
arguments: publishAllPublicationsToMavenCentral
run: ./gradlew publishAllPublicationsToMavenCentral

- name: Publish To Gradle Plugin Portal
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v')
Expand Down

0 comments on commit bcfcf4a

Please sign in to comment.