Skip to content

v1.5.1

v1.5.1 #23

name: Deploy to Release Repo
# Builds, tests, and publishes dev builds of Android SDKs. The CD destination and CI configuration are handled by your gradle files. You only invoke tasks here
# ** Building multiple modules? If one depends on another, you'll have to build the dependencies in one step and the rest in another.
# See below for more info
# REPOSITORY SECRETS REQUIRED: (see https://docs.github.com/en/actions/security-guides/encrypted-secrets)
# "ARTIFACTORY_EMAIL": an artifactory account email with publish permissions for the destination artifactory
# "ARTIFACTORY_PASSWORD": the password for the artifactory account
on:
release:
types:
- published
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
env:
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Parse the version out of the tag name
id: version
run: >
echo "version_name="$(echo ${{ github.event.release.tag_name }} | sed -E "s/^v//")"" >> $GITHUB_OUTPUT
# This step will build all modules configured for publication and publish them
# Does your project publish multiple libraries in a dependency chain? You'll have to add another copy of this step and build the dependency in the first one
- name: Build and Publish to Dev Repo [Base]
uses: gradle/[email protected]
with:
arguments: :library:artifactoryPublish
env:
ORG_GRADLE_PROJECT_artifactory_user: ${{ secrets.ARTIFACTORY_EMAIL }}
ORG_GRADLE_PROJECT_artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
GH_USER: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Publish to Dev Repo [Common]
uses: gradle/[email protected]
with:
arguments: :library-ima:artifactoryPublish :library-exo:artifactoryPublish
env:
ORG_GRADLE_PROJECT_artifactory_user: ${{ secrets.ARTIFACTORY_EMAIL }}
ORG_GRADLE_PROJECT_artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
GH_USER: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure AWS
run: >
aws configure set aws_access_key_id ${{ secrets.AWS_DOCS_KEY }};
aws configure set aws_secret_access_key ${{ secrets.AWS_DOCS_SECRET }}
# If you have a multi-module project or monorepo, you'll need to repeat these steps
# POSSIBLE CONFIGURATION: make sure the `arguments:` tag matches the correct task(s) for your project
- name: Build Dokka Docs
uses: gradle/[email protected]
with:
arguments: 'dokkaHtmlMultiModule'
# REQUIRED CONFIGURATION: You have to change YOUR-LIB to a suitable URL slug for your project
- name: Update the docs AWS bucket
run: |
aws s3 rm --recursive "s3://mux-devdocs/media3-data/latest/"
aws s3 sync build/dokkaOutput s3://mux-devdocs/media3-data/${{ steps.version.outputs.version_name }}/
aws s3 sync build/dokkaOutput s3://mux-devdocs/media3-data/latest/
- name: Update the devdocs site
run: |
echo "${{ secrets.DOCS_REPO_PAT }}" | gh auth login --with-token
gh workflow run -R muxinc/devdocs-directory deploy-to-s3