Skip to content

Instantly share code, notes, and snippets.

@shafayathossain
Created December 3, 2021 04:35
Show Gist options
  • Save shafayathossain/96e784f62dd2a92bc44eaa980e293086 to your computer and use it in GitHub Desktop.
Save shafayathossain/96e784f62dd2a92bc44eaa980e293086 to your computer and use it in GitHub Desktop.
Complete workflow file to getting started with CI/CD for Android project
name: CI/CD workflow
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Caching ruby dependencies
uses: actions/cache@v2
with:
path: 'vendor/bundle'
key: ${{ runner.os }}-gems-${{ secrets.GEMS_CACHE_VERSION }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Caching Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install dependencies to support ruby project
run: |
bundle config --global set deploy_platform_default x86_64-linux
bundle install
- name: Build and distribute app
run: |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
git config --global user.email ${{github.event.pusher.email}}
git config --global user.name ${{github.event.pusher.name}}
bundle exec fastlane build_and_distribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment