Bump gradle/gradle-build-action from 2.5.1 to 2.9.0 (#209) #487
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [ opened, labeled, unlabeled, synchronize ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
JAVA_VERSION: 11 | |
ANDROID_API_LEVEL: 23 | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1.1.0 | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v3.13.0 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2.9.0 | |
- name: Run Build | |
run: ./gradlew ktlintCheck build -s | |
- name: Run Unit Tests | |
run: rm -rf ~/.m2/repository/com/jaredsburrows/gradle-spoon-plugin/ && ./gradlew publishToMavenLocal -x test -s | |
- name: Run Instrumentation Tests on Android API ${{ env.ANDROID_API_LEVEL }} | |
uses: reactivecircus/android-emulator-runner@v2.28.0 | |
with: | |
api-level: ${{ env.ANDROID_API_LEVEL }} | |
script: cd test-app && ../gradlew clean spoonDebugAndroidTest checkReports -s && cd .. | |
- name: Publish Test Report | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2.8.0 | |
if: always() | |
with: | |
comment_mode: off | |
files: '**/build/test-results/test/TEST-*.xml' | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3.1.2 | |
if: github.repository == 'jaredsburrows/gradle-spoon-plugin' && github.ref == 'refs/heads/master' | |
with: | |
name: gradle-spoon-plugin-${{ github.workflow }}-${{ github.run_id }} | |
path: | | |
build/libs | |
build/outputs | |
build/publications | |
build/distributions | |
build/reports | |
build/test-results | |
publish: | |
name: Publish Snapshot | |
runs-on: ubuntu-latest | |
if: github.repository == 'jaredsburrows/gradle-spoon-plugin' && github.ref == 'refs/heads/master' | |
needs: | |
- build | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.1.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1.1.0 | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v3.13.0 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2.9.0 | |
- name: Publish | |
run: ./gradlew publish -s | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} |