Implement AudioBarVisualizer #92
Workflow file for this run
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: Android CI | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
- '.gitignore' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
- '.gitignore' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./components-android | |
steps: | |
- name: checkout components-android | |
uses: actions/[email protected] | |
with: | |
path: ./components-android | |
submodules: recursive | |
- name: set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- uses: actions/[email protected] | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Gradle clean | |
run: ./gradlew clean | |
- name: Spotless check | |
if: github.event_name == 'pull_request' | |
run: | | |
git fetch origin main --depth 1 | |
./gradlew spotlessCheck | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease livekit-compose-components:testRelease | |
# TODO: Figure out appropriate place to run this. Takes ~3 mins, so pretty slow. | |
# # generates coverage-report.md and publishes as checkrun | |
# - name: JaCoCo Code Coverage Report | |
# id: jacoco_reporter | |
# uses: PavanMudigonda/[email protected] | |
# with: | |
# coverage_results_path: "client-sdk-android/livekit-android-sdk/build/jacoco/jacoco.xml" | |
# coverage_report_name: Coverage | |
# coverage_report_title: JaCoCo | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# skip_check_run: false | |
# minimum_coverage: 60 | |
# fail_below_threshold: false | |
# publish_only_summary: false | |
# | |
# # Publish Coverage Job Summary | |
# - name: Add Coverage Job Summary | |
# run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY | |
# | |
# # uploads the coverage-report.md artifact | |
# - name: Upload Code Coverage Artifacts | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: code-coverage-report-markdown | |
# path: "*/coverage-results.md" | |
# retention-days: 7 | |
- name: get version name | |
if: github.event_name == 'push' | |
run: echo "::set-output name=version_name::$(cat gradle.properties | grep VERSION_NAME | cut -d "=" -f2)" | |
id: version_name | |
- name: Create gpg key and import into gradle properties | |
if: github.event_name == 'push' && contains(steps.version_name.outputs.version_name,'SNAPSHOT') | |
run: | | |
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc | |
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc | |
sed -i -e "s,nexusUsername=,nexusUsername=$NEXUS_USERNAME,g" gradle.properties | |
sed -i -e "s,nexusPassword=,nexusPassword=$NEXUS_PASSWORD,g" gradle.properties | |
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties | |
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties | |
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties | |
sed -i -e "s,STAGING_PROFILE_ID=,STAGING_PROFILE_ID=$PROFILE_ID,g" gradle.properties | |
env: | |
GPG_KEY_ARMOR: "${{ secrets.SIGNING_KEY_ARMOR }}" | |
GPG_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
GPG_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
PROFILE_ID: ${{ secrets.STAGING_PROFILE_ID }} | |
- name: Publish snapshot | |
if: github.event_name == 'push' && contains(steps.version_name.outputs.version_name,'SNAPSHOT') | |
run: ./gradlew publish |