ci: cache Gradle, harden permissions, fix test triggers (#45)

- Add gradle/actions/setup-gradle caching to all three workflows
- test.yml: trigger on pull_request + push to master (was branches-ignore: master), so PRs from forks are covered and master is verified after merge; add least-privilege permissions and PR-only concurrency
- publishRelease.yml: drop unused 'secrets: inherit' and the dead SNAPSHOT env var (Gradle reads the snapshot project property, not a plain env var); add contents: read permissions; fix the misleading Maven Central comment (upload only stages on Central Portal, the final Publish is manual)
- docs.yml: add Gradle caching
This commit is contained in:
2026-06-07 23:25:55 +02:00
committed by GitHub
parent f47fb091ec
commit 0b8429c859
3 changed files with 20 additions and 4 deletions

View File

@@ -2,9 +2,17 @@ name: Test
on:
push:
branches-ignore: [master]
branches: [master]
pull_request:
workflow_call:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: ${{ matrix.name }}
@@ -27,5 +35,7 @@ jobs:
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Test
run: ./gradlew ${{ matrix.tasks }} --console=plain