Merge pull request #240 from avro-kotlin/main-v2 #23
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-main | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
paths-ignore: | |
- 'doc/**' | |
- '*.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Run tests | |
run: ./gradlew check | |
- name: Bundle the build report | |
if: failure() | |
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | |
- name: Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: error-report | |
path: build-reports.zip | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: deploy to sonatype snapshots | |
run: ./gradlew publish | |
env: | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} |