Last active
November 15, 2020 12:02
-
-
Save sagar-viradiya/de5f448e811f587b2c599b0a9a7cdb9f to your computer and use it in GitHub Desktop.
GitHub actions workflow for automating your internal android app distribution on Internal App Sharing
This file contains hidden or 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: Build, Upload to IAS and share on slack. | |
on: | |
push: | |
branches: | |
# Specify branch from where you are sharing build | |
- [branch_name] | |
jobs: | |
build: | |
name: Building app | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out branch | |
uses: actions/checkout@v2 | |
with: | |
# Specify branch to checkout | |
ref: '[branch_name]' | |
- name: Settting up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Runing build command | |
# Run your own gradle command to generate build. | |
run: ./gradlew bundleRelease | |
- name: Uploading build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bundle | |
path: app/build/outputs/bundle/release/app-release.aab | |
upload_to_internal_app_sharing: | |
name: Uploading build to IAS | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Downloading build | |
uses: actions/download-artifact@v2 | |
with: | |
name: bundle | |
- name: Uplaoding to IAS | |
id: ias | |
uses: sagar-viradiya/[email protected] | |
with: | |
# Your service account JSON GitHub secret | |
serviceAccountJsonPlainText: ${{ secrets.[your-github-service-acc-json-secret] }} | |
# Your package name | |
packageName: '[your-package-name]' | |
aabFilePath: 'app-release.aab' | |
- name: Sharing on slack | |
uses: rtCamp/[email protected] | |
env: | |
# Your slack webhook GitHub secret | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
# Slack channel where you want to notify | |
SLACK_CHANNEL: [your-channel] | |
SLACK_USERNAME: "JARVIS" | |
SLACK_TITLE: "Internal testing build" | |
SLACK_MESSAGE: ${{ steps.ias.outputs.downloadUrl }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment