Update README.md (#140) #90
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
# This is a basic workflow to help you get started with Actions | |
name: Deploy | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
detekt: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'corretto' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- uses: actions/checkout@v2 | |
- name: Build plugin | |
run: ./gradlew :safeToRunBuilder:shadowJar | |
- name: Run Detekt | |
run: ./gradlew detekt | |
build: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 11 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- uses: actions/checkout@v2 | |
- name: Build plugin | |
run: ./gradlew :safeToRunBuilder:shadowJar | |
- name: Run build | |
run: ./gradlew build assembleDebug assembleDebugAndroidTest | |
env: | |
SERVER_URL: 'http://example.com' | |
API_KEY: 'apikey' | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build, detekt] | |
environment: maven-central | |
steps: | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 11 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- uses: actions/checkout@v2 | |
- name: Download file | |
uses: timheuer/[email protected] | |
with: | |
fileName: 'oss_signing_key.gpg' | |
fileDir: '/home/runner/work/' | |
encodedString: ${{ secrets.SIGNING_KEY }} | |
- name: Build deploy | |
run: ./gradlew build publishToSonatype | |
env: | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
SIGNING_SECRET_KEY_RING_FILE: "/home/runner/work/oss_signing_key.gpg" | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SERVER_URL: 'http://example.com' | |
API_KEY: 'apikey' |