Git Product home page Git Product logo

godot-android-cd-pipeline's Introduction

๐ŸŽฎ Godot Android Continuous Deployment ๐Ÿš€

This repository provides a continuous deployment pipeline for Godot Android games using GitHub Actions. When you push to the prod branch, your APK is built and sent to you on Telegram. ๐Ÿ“ฌ

๐Ÿ› ๏ธ Setup

  1. Use this template: Press the button on the top right corner. Make sure you include all branches. ๐Ÿ“‚

  2. Add Your Game: Place your Godot game inside the "game" folder. Make sure you don't delete the file named export_presets.android.example. You can edit it to include your own export configs later. Everything else in the game folder is related to the demo and can be deleted.๐ŸŽฒ

  3. Set the Game Info: You must set your current version of the game in the "version" file. The first line must be Version_Name-Version_Code(e.g. 1.0.1-12). Note that builds may fail with versions below 1. You also have to set the values for APP_NAME, UNIQUE_NAME and PACKAGE_NAME. ๐Ÿท๏ธ

  4. Create Android Keystore Files: If you already have your Android keystore files, skip this step. If you don't, you can use keytool from JDK to create them. ๐Ÿ”‘

    keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12
    keytool -v -genkey -keystore keystore.keystore -alias your_alias_name -keyalg RSA -validity 10000 -keypass your_keypass -storepass your_storepass
  5. Setup Repository Secrets for GitHub Actions: Set the following secrets at https://github.com/yourhandle/yourrepo/settings/secrets/actions. ๐Ÿ•ต๏ธโ€โ™€๏ธ

    • ANDROID_KEYSTORE_BASE64: base64 encoding of keystore.keystore (Can be done on bash with base64 keystore.keystore -w 0)
    • ANDROID_KEYSTORE_DEBUG_BASE64: base64 encoding of debug.keystore (Can be done on bash with base64 debug.keystore -w 0)
    • ANDROID_KEYSTORE_ALIAS: your_alias_name
    • ANDROID_STORE_PASSWORD: your_storepass
    • ANDROID_KEYSTORE_PASSWORD: your_keypass
    • GROUP_ID: Telegram ChatID of the group you want the bot to send the APK. You can find it by forwarding a message from the group/chat to this bot https://t.me/chatIDrobot
    • TELEGRAM_TOKEN: API Token of the bot that's going to send you the APK. You can create a bot by talking to https://t.me/BotFather. Also, make sure to add the bot to your group chat!
  6. Trigger the Build: Make a change to the "version" file and when you push to prod, your APK is built and sent to you on Telegram. ๐Ÿ“ฒ

๐Ÿ’ก Tips

  • Do not commit to the prod branch! The correct way to use this is to merge your main branch to your prod branch and when the version number changes, this action will be triggered. ๐Ÿ”„
  • There seems to be a bug that fails the build when keypass and storepass are different values. ๐Ÿ›
  • Repo secrets can cause so much trouble! Be careful and always double-check them! ๐Ÿ”
  • If you are on Windows, you can find keytool.exe here: C:\Program Files\Java\jdk-*\bin\

๐Ÿค Community

Contributions are very welcome! Also if you had any problems implementing this pipeline for your app, start a discussion in this repository and I'll try to help you. ๐Ÿ’ฌ

godot-android-cd-pipeline's People

Contributors

amirinsight avatar

Stargazers

 avatar

Watchers

 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.