Create Packager abstraction for Gradle task. #86
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: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '**' | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v3 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
check-latest: true | |
- name: Assemble & Test | |
run: ./gradlew clean assemble test detekt --no-build-cache --no-daemon --stacktrace | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: test-results | |
path: ./**/build/reports/tests/ | |
publish-snapshot: | |
runs-on: ubuntu-latest | |
if: github.repository == 'christiandeange/aaraar' && github.ref == 'refs/heads/main' | |
timeout-minutes: 30 | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
check-latest: true | |
- name: Publish Snapshot | |
env: | |
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
run: | | |
ORG_GRADLE_PROJECT_mavenCentralUsername="$SONATYPE_NEXUS_USERNAME" \ | |
ORG_GRADLE_PROJECT_mavenCentralPassword="$SONATYPE_NEXUS_PASSWORD" \ | |
./gradlew clean publish --no-build-cache --no-daemon --stacktrace |