Almost instant but not quite (/understatement)
- Auto generates your personal Kodi addon repository hosted on GitHub
- Auto updates everytime you update your addon code
- Auto generates a repository addon zip for your new personal repository
These instructions require you to have a bash environment and git installed. Most Linux and Mac machines will already have these available by default. For Windows, you probably should install the Git for Windows and run the commands from Git Bash.
These instructions will be a 100x easier if you have a basic understanding of Git.
-
Create a new GitHub repository with the files from this repo or just fork this one if you don't care about names and such
-
Create an account at Travis and add your project to Travis: https://travis-ci.org/profile/
-
In terminal (or Git Bash), clone your repo locally
git clone git@github.com:YOUR_USER_NAME/YOUR_REPO_NAME.git my_kodi_repo cd my_kodi_repo
-
Generate a GitHub deploy key
ssh-keygen -q -t rsa -b 4096 -C 'put-your-repo-name-here' -f deploy_key -N ''
If successful, you will see 2 files
deploy_key
anddeploy_key.pub
in the folder. -
Copy the contents of the text file
deploy_key.pub
and set it as a new Deploy key for your projecthttps://github.com/<your name>/<your repo>/settings/keys
. Remember to allow write access. -
From the Terminal, login with the travis cli
travis login
-
Use
travis
to encrypt yourdeploy_key
and save the encrypted key as.github/deploy_key.enc
# or go to where your repo folder is cd my_kodi_repo && rm .github/deploy_key.enc travis encrypt-file deploy_key .github/deploy_key.enc
You should see something like
encrypting deploy_key for yourname/your-repo-project storing result as deploy_key.enc storing secure env variables for decryption Please add the following to your build script (before_install stage in your .travis.yml, for instance): openssl aes-256-cbc -K $encrypted_0a6446eb3ae3_key -iv $encrypted_0a6446eb3ae3_key -in super_secret.txt.enc -out super_secret.txt -d Pro Tip: You can add it automatically by running with --add. Make sure to add deploy_key.enc to the git repository. Make sure not to add deploy_key to the git repository. Commit all changes to your .travis.yml.
Look for the "encryption label". For example, in the output above,
0a6446eb3ae3
is the encryption label. -
Take the encryption label from the previous step and set it in the file
.travis.yml
. Take this chance to also set your email address in.travis.yml
-
Add your addon source code folders into the
src/
folder so that it looks like- src/ - your.addon.folder.one/ - your.addon.folder.two/
-
Git add your changes and new files and push it to your repo.
git add -A . git push
-
If nothing goes wrong, you will have a personal Kodi addon repository at
https://your_user_name.github.io/your_repo_name/
in a few minutes.
By default, only the master
branch is built to create an addons repository compatible with Krypton (minversion="17.0.0").
You can change this by customising .github/config.json
and .travis.yml
.
For example, to make your repo only for Leia, edit .github/config.json
to look like
{
"branchmap": [
{
"name": "master",
"minversion": "17.9.0"
}
]
}
If you have different branches for different Kodi versions:
.github/config.json
{
"branchmap": [
{
"name": "master",
"minversion": "17.9.0"
},
{
"name": "krypton",
"minversion": "17.0.0"
}
]
}
.travis.yml
branches:
only:
- master
- krypton