Skip to content

Commit

Permalink
Consolidate GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tginsberg committed Oct 23, 2024
1 parent 61e7aae commit a29ec25
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: Build and Test

on:
[ push ]
[ pull_request, push ]

jobs:
build:

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

pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,10 +21,22 @@ jobs:
distribution: 'temurin'
cache: 'gradle'

- name: Build and Publish
run: ./gradlew build publish --no-daemon
- name: Build
run: ./gradlew build --no-daemon

- name: Publish
if: github.ref != 'refs/heads/master'
run: ./gradlew publish --no-daemon
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
SONATYPE_SIGNING_KEY: ${{ secrets.SONATYPE_SIGNING_KEY }}
SONATYPE_SIGNING_PASSPHRASE: ${{ secrets.SONATYPE_SIGNING_PASSPHRASE }}

- name: Add coverage to PR
if: github.event_name == 'pull_request'
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
33 changes: 0 additions & 33 deletions .github/workflows/coverage.yml

This file was deleted.

0 comments on commit a29ec25

Please sign in to comment.