ci: dont publish on pr #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Test" | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
REPOSILITE_USERNAME: ${{ secrets.REPOSILITE_USERNAME }} | |
REPOSILITE_PASSWORD: ${{ secrets.REPOSILITE_PASSWORD }} | |
REPOSILITE_URL: "https://reposilite.silenium.dev/snapshots" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} | |
gradle-home-cache-cleanup: true | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
add-job-summary-as-pr-comment: on-failure | |
- name: Build with Gradle | |
run: ./gradlew build publish --console=plain --info --build-cache --configure-on-demand --configuration-cache --parallel | |
- uses: actions/upload-artifact@v4 | |
name: 'Upload reports' | |
if: always() | |
with: | |
name: reports | |
path: ./build/reports | |
retention-days: 5 | |
dependency-submission: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project sources | |
uses: actions/checkout@v4 | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/dependency-submission@v3 | |
with: | |
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" |