This setup will automate Github releases by creating a new release with a ready-for-users zipfile of your mod every time a git tag is pushed to your GitHub repository.
- Create a folder called
.circleci
in your mod directory. Add the filesconfig.yml
,zipMod.sh
, andblacklist.txt
to it. - Open
.circleci/zipmod.sh
with a text editor (e.g. VS Code, Notepad++). Change the value formodFolderName
. This will be the name of the mod folder.- It's best practice not to use spaces, e.g. "Gates-Awakened".
- Create an account at CircleCI and select "Sign Up With GitHub".
- Select "Add Projects" and choose your repository to set it up.
- Create a new Personal Access Token in Github - select
write:packages
anddelete:packages
(others will automatically get selected). Copy the token.- This will allow CircleCI to create new Github releases automatically.
- On CircleCI, open the Settings page for your new project, select Environment Variables, and click Add Variable. Name it
"GITHUB_TOKEN"
and paste the token that you had copied. - That's it! The next time you push a git tag (
git tag 1.0.0 && git push origin 1.0.0
), CircleCI will automatically create a zip file containing your mod name with the version appended, then create a new GitHub release with the zip file.- You will need to update the release's changelog manually.