Skip to content

Instantly share code, notes, and snippets.

@sagar-viradiya
Last active November 15, 2020 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar-viradiya/de5f448e811f587b2c599b0a9a7cdb9f to your computer and use it in GitHub Desktop.
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
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/internal-app-sharing-action@v1.1.0
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/action-slack-notify@v2.1.0
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