To get your OctoGramBuilder up and running with GitHub Actions workflow, adhere to the following guidelines:
- Head to the Firebase Console.
- Create a new project.
- Click the Android icon at the center of the project overview page.
- For the Android package name, use:
it.octogram.android
. - Download your google-services.json.
To create your own application using the Telegram API, follow these steps:
- Log in to your Telegram core account by visiting: https://my.telegram.org.
- Access the "API development tools" section and complete the provided form.
- Upon completion, you will receive basic addresses, along with the
api_id
andapi_hash
parameters required for user authorization.
-
Create a new file named
local.properties
, and include the following line as a placeholder, unless you intend to acquire an actual key. Instructions for obtaining a valid key can be found here:MAPS_API_KEY=Abcdefgh:982735541'
In your signing.properties
file, include the following lines with your keystore information:
storePassword=<your-keystore-password>
keyAlias=<your-keystore-alias>
keyPath=<your-keystore-file-path>
keyPassword=<your-keystore-password>
To generate this information, follow these steps:
- Open a terminal in your desired directory.
- Run the following command to create the keystore file and set the keystore password:
keytool -genkey -v -keystore <your-keystore-file-name>.jks -keyalg RSA -keysize 2048 -validity 10000 -alias <your-keystore-alias> -storetype JKS -keypass <your-keystore-password> -storepass <your-keystore-password>
-
Download the
BuildVars.java
file from this link. -
Edit the
BuildVars.java
file and replace theAPP_ID
andAPP_HASH
values with the ones obtained in Step 2.
-
Create a private GitHub repository.
-
Upload the following files to the repository:
google-services.json
local.properties
signing.properties
BuildVars.java
- Your keystore file
-
Create a new personal access token with the
repo
scope. Refer to the instructions provided here for detailed guidance. -
Save the generated token.
-
In your forked repository of this project:
- Go to the repository's settings.
- Click on "Secrets and variables."
- Add a new repository secret named
ACCESS_TOKEN
and provide the token you generated as the value.
-
Modify the workflow to clone your private repository:
- Access the workflow configuration file at this link.
- Change the values of
owner
andrepository
to your GitHub account name (e.g.,Lyceris-chan
for me) and the name of your private repository (e.g.,OctoGramBuilderSecrets
for me).
- In your forked repository of this project:
- Go to the repository's settings.
- Select the Actions section.
- Choose the General option.
- Scroll to the bottom and adjust the 'Workflow permissions' to Read and Write permissions. This enables the workflow to autonomously generate and upload its release upon completion.
This project uses the appleboy/telegram-action action to send build and status notifications to the defined TG_CHAT_ID secret using the TG_TOKEN secret for authentication.
If you don't use Telegram or don't want to receive notifications for build and status updates, then edit the build-release.yml to remove the steps including Telegram.
You can obtain the Telegram chat ID by sending a message in a chat and forwarding the message to @ShowJsonBot. The chat ID is shown under forward_from_chat
.
In this context, a token is a string that authenticates your bot (not your account) on the bot API. Each bot has a unique token which can also be revoked at any time via @BotFather.
Obtaining a token is as simple as contacting @BotFather, issuing the /newbot
command, and following the steps until you're given a new token. You can find a step-by-step guide here.
Your token will look something like this:
4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc
In your forked repository of this project:
- Go to the repository's settings.
- Click on "Secrets and variables."
- Add a new repository secret named
TG_CHAT_ID
and provide the chat ID you obtained from @ShowJsonBot earlier. - Add a new repository secret named
TG_TOKEN
and provide the bot token you obtained from @BotFather earlier.
Make sure to save your token in a secure place, treat it like a password, and don't share it with anyone.
- Open the
build-release.yml
file in your forked repository. - Locate the following line:
url="https://github.com/Lyceris-chan/OctoGramBuilder/releases/download/BuildCache/cache.tzst"
- Replace the URL with the URL of your own 💾 OctoGram build cache release that contains the
cache.tzst
file generated AFTER the first successful build.
-
Navigate to the "Actions" tab in your repository.
-
Select "Build and Release OctoGram."
-
Click on "Run Workflow," then click "Run Workflow" again (the second button is typically green).
-
The initial workflow run may take around an hour or more. Upon completion, it will create two releases:
- 🐙 OctoGram build: Contains the built APKs.
- 💾 OctoGram build cache: Holds cached data from the build, speeding up future runs to under 30 minutes.