Bump actions/upload-artifact from 3.1.3 to 4.1.0 #546
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 | |
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/[email protected] | |
- name: Validate Gradle Wrapper | |
uses: gradle/[email protected] | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- 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/[email protected] | |
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/[email protected] | |
if: always() | |
with: | |
comment_mode: off | |
files: '**/build/test-results/test/TEST-*.xml' | |
- name: Upload Artifacts | |
uses: actions/[email protected] | |
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/[email protected] | |
- name: Validate Gradle Wrapper | |
uses: gradle/[email protected] | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/[email protected] | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- 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 }} |