Skip to content

Instantly share code, notes, and snippets.

View shafayathossain's full-sized avatar

Shafayat Hossain shafayathossain

  • Dhaka, Bangladesh
View GitHub Profile
@shafayathossain
shafayathossain / AppLink_Integration_AndroidManifest.xml
Last active July 28, 2023 04:46
Intent filters for the URLs you want to open in your app
@shafayathossain
shafayathossain / Android ci-cd-workflow.yml
Created December 3, 2021 04:35
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
@shafayathossain
shafayathossain / Run Fastlane Project.yml
Last active December 3, 2021 04:33
Step to run Fastlane Project from Github Workflow
- 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
@shafayathossain
shafayathossain / Cache dependencies.yml
Created December 3, 2021 04:20
Step to cache Ruby dependencies and Gradle packages
- 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:
@shafayathossain
shafayathossain / Checkout Github Repository Step.yml
Created December 3, 2021 04:08
Step to checkout the repository
- name; Checkout the repository
uses: actions/checkout@v2
with: fetch-depth: 0
@shafayathossain
shafayathossain / Base Structure of Workflow File.yml
Created December 3, 2021 04:02
Base structure of a github workflow file.
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.
@shafayathossain
shafayathossain / Fastfile
Created December 1, 2021 17:17
Final fastfile for integrating continuous delivery using fastlane
fastlane_require "dotenv"
PACKAGE_NAME = "<package name here>"
FIREBASE_APP_ID = "<firebase app id here>"
KEYSTORE_PATH = nil
FIREBASE_KEY_PATH = nil
PLAYSTORE_KEY_PATH = nil
BUNDLE_FILE_PATH = nil
UPDATED_VERSION_CODE = nil
@shafayathossain
shafayathossain / Fastfile build_and_distribute.rb
Created December 1, 2021 17:13
Responsible for test, build and upload bundle to firebase app distribution and playstore by calling other private lanes.
desc "Responsible for testing, building and uploading bundle to firebase app distribution and playstore by calling other private lanes."
lane build_and_distribute:
increment_version_code_in_project_gradle()
run_unit_tests()
build()
distribute_to_firebase()
distribute_playstore()
end
@shafayathossain
shafayathossain / Fastfile after_all.rb
Created December 1, 2021 17:10
After successful execution of all task, this block is called
desc "After successful execution of all task, this block is called"
after_all do
git_add(path: "*")
git_commit(
path: "*",
message: "#" + UPDATED_VERSION_CODE + " released"
)
push_to_git_remote(
local_branch: buildConfigs.key(options[:buildConfig]),
remote: "origin",