Git Product home page Git Product logo

apk-release-deploy's Introduction

APK release and deploy

Deploy APK file with changelog for Android projects with CI/CD. This script uploads the release APK file to Dropbox and sends an email, with download link and changelog.

This script is used in my GitLab CI/CD for Android projects. The process is described in this Medium article and also in my GitHub pages.

Sample project that is using this script for CI/CD https://gitlab.com/arbuz/android-ci-cd.

Motivation

I created this for Gitlab CI, when I had a problem making build/release artifacts public. This script is the last stage for Android CI/CD process and may be helpful in following cases:

  • Early stage projects which are not present in any app market, but need a way of distribution.
  • Enthusiastic CEO who wants to have the latest builds with the latest changes.
  • Freelancer who needs a painless way to distribute his work to clients.
  • Teams that want an easy way to send the app for regression tests.

How does it work

API

This project is using Dropbox for APK storage and Zapier for sending emails. You will need Dropbox API key and Zapier hook URL.

Changes

Changes are extracted from provides CHANGEOG file. Each version change should end with '##' and begin with a title, that starts with '#' char. Example:

# Version 1.05

Removed Google Maps Fragment
Added:
 - Settings crash
 - ANR when loading
##
# Version 1.04

Added Google Maps Fragment
Fixed:
 - Settings crash
 - ANR when loading
##

The script will extract the latest (1.05 in example) changes.

Email template

The script is using email template file for email composing. The template can have placeholders for the following: app name, app version, download link, changes. Example for app name CoolApp, version 1.05:

#subject
New {app_name} release, version {app_version}
#body
New version is available for download:
{app_download_url}

Changes:
{change_log}

This email was sent automatically, please do not reply.

This will compose the following email subject:

New CoolApp release, version 1.05

And email body:

New version is available for download:
https://www.dropbox.com/s/lk2lk321jl1/coolapp_1_05.apk?dl=1

Changes:
Removed Google Maps Fragment
Added:
 - Settings crash
 - ANR when loading

This email was sent automatically, please do not reply.

Usage

Help:

python3 deploy.py -h

Run (all arguments required):

python3 deploy.py \
    --release.dir=app/build/outputs/apk/release \
    --app.name=CoolAppp \
    --dropbox.key=$DROPBOX_KEY \
    --dropbox.folder=build \
    --changelog.file=CHANGELOG \
    --template.file=template_file \
    --zapier.hook=$ZAPIER_HOOK \
    [email protected],[email protected]

apk-release-deploy's People

Contributors

mega-arbuz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.