Prepare for release 0.3.0 #56
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: CI | |
on: | |
# Only run on push to main branch | |
push: | |
branches: | |
- main | |
# Always run on PRs | |
pull_request: | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx2g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: 'macos-latest' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Gradle Wrapper Validation | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Install JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Test Common JVM | |
run: ./gradlew jvmTest koverMergedReport --stacktrace | |
- name: (Fail-only) Bundle test reports | |
if: failure() | |
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | |
- name: (Fail-only) Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: error-report | |
path: build-reports.zip | |
publish: | |
if: github.repository == 'dropbox/differ' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
needs: [build] | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Gradle Wrapper Validation | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Install JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Publish release | |
run: ./gradlew publish # Publish all artifacts to all configured repositories. Maven Central for this project. | |
if: success() | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} |