Blog Infos
Author
Published
Topics
,
Published
Let’s start with GitHub action
name: CI workflow
# Events when the workflow will dispatch/run.
on: push
jobs:
# Define jobs and their steps that will be executed.
deploy:
steps:
# Define steps to complete the current job.
Setup Linux OS
deploy:
   runs-on: ubuntu-latest
   steps:
Checkout The GitHub Repository
— name: Checkout the repository
     uses: actions/checkout@v2
     with: fetch-depth: 0
Setup JDK 11
- name: Setup JDK 11
       uses: actions/setup-java@v2
       with:
         distribution: "zulu"
         java-version: 11

Job Offers

Job Offers

There are currently no vacancies.

OUR VIDEO RECOMMENDATION

,

From Chaos to Consistency: Managing Build and Release for 25+ Android Repos with Github Actions

Managing the build and release process for over 25 Android repositories can be a daunting task. With each repository having its own pipeline or workflow, it can become difficult to ensure consistency and quality across…
Watch Video

From Chaos to Consistency: Managing Build and Release for 25+ Android Repos with Github Actions

Shrikant Ballal
Staff Engineer
YML

From Chaos to Consistency: Managing Build and Release for 25+ Android Repos with Github Actions

Shrikant Ballal
Staff Engineer
YML

From Chaos to Consistency: Managing Build and Release for 25+ Android Repos with Github Actions

Shrikant Ballal
Staff Engineer
YML

Jobs

Setup Android SDK
- name: Setup Android SDK
       uses: android-actions/setup-android@v2
Setup Ruby
- name: Setup ruby
       uses: ruby/setup-ruby@v1
       with: ruby-version: 2.7
Caching Environment Dependencies
- name: Cache 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: Cache 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-
Install Dependencies to Support Ruby Project
- name: Install dependencies to support ruby project
  run: |
    bundle config --global set deploy_platform_default x86_64-linux
    bundle install
Run Fastlane Project
- name: Build and distribute app
  run: |
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    bundle exec fastlane build_and_distribute
- 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
Finally…
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

YOU MAY BE INTERESTED IN

YOU MAY BE INTERESTED IN

blog
Life is hard. We are engulfed in tasks that take time, are boring, and…
READ MORE
blog
As a developer working on various Kotlin Multiplatform projects, whether for your job or…
READ MORE
blog
There are a lot of blogs and videos on why we need CI/CD. From…
READ MORE
blog
To release an Android app to the public, every Android Developer needs to build…
READ MORE

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu