Skip to content

Add OSGi metadata via build #297

Add OSGi metadata via build

Add OSGi metadata via build #297

Workflow file for this run

name: build
on:
pull_request:
branches:
- trunk
push:
branches:
- trunk
workflow_dispatch:
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 19
- uses: gradle/gradle-build-action@v2
- name: Test
run: ./gradlew build
android:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
api-level:
- 21
- 24
- 26
- 29
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck
env:
API_LEVEL: ${{ matrix.api-level }}
robovm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Run Tests
run: ./gradlew retrofit:robovm-test:robovmTest
publish:
runs-on: ubuntu-latest
if: github.repository == 'goooler/retrofit' && github.ref == 'refs/heads/trunk'
needs:
- jvm
- android
- robovm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 19
- uses: gradle/gradle-build-action@v2
- name: Upload Artifacts
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ secrets.GH_USERNAME }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GH_TOKEN }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}