Revert "PI-3857 - ensure PR title contains jira ticket number" #18
Workflow file for this run
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 Deploy" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'oracle' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Build with gradle | |
run: ./gradlew build --no-daemon | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'oracle' # See 'Supported distributions' for available options | |
java-version: '20' | |
- name: Run tests | |
run: ./gradlew test --no-daemon | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: JUnit Tests | |
path: build/test-results/test/*.xml | |
reporter: java-junit # Format of test results | |
publish: | |
name: Publish Artifacts | |
needs: [build] | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'oracle' | |
cache: 'gradle' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b | |
- name: Publish with Gradle | |
env: | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} | |
run: ./gradlew publishToSonatype --no-daemon |