Hi,
Script for creating new Github Release from commandline
Features:
Prerequisites:
Requirements:
Installation:
Reference of the proper folder structure:
![prz2z60ja0wg.png]()
Usage:
Feedback/questions/comments are welcomed.
Script for creating new Github Release from commandline
Features:
- cross-platform, single code for Windows, macOS, and Linux
- release version (tag) is taken directly from tp2 file
- checking of the mod "VERSION" keyword, prevent creating "2.0.0" release when you mod version is "1.8.0"
- prevent creating new release if the same release already exist
- prevent creating new release if there are uncommitted file modifications
- release description can be edited before creating a new release
- initial release description is generated from commit messages between the new release and previous release
Prerequisites:
- Github account
- Github Personal Access Token" with "public_repo" privilege
- read Git and Github tutorial
- locally cloned mod repository
Requirements:
- Github Desktop
- additionally only for Windows 7/8.1 - either .NET Framework 4.5.2+ and Powershell 5.1 or Powershell 6
- additionally only for macOS, Linux - Powershell 6
Installation:
- Download and extract ModRelease repository, move everything from 'ModRelease-master' folder directly into the folder where you keep all cloned top-level mod folders.
- Create new "Personal Access Token" with "public_repo" privilege, it's not your password, you can revoke it at any time, more info here.
- Save it to "#ModRelease-Github-Key-Example.txt" file and rename it to #ModRelease-Github-Key.txt
- Put #ModRelease.bat/#ModRelease.command inside the top-level directory of the mod's cloned Github repository, it's where WeiDU executable should be, use the included mod example as reference.
Reference of the proper folder structure:
- Red - #ModRelease folder and #ModRelease.bat/#ModRelease.command files location
- Yellow - top-level folder of the local repository
- Green - .git folder location inside local repository

Usage:
- Assuming that all mod files are ready for a new release, increase mod version inside mod readme and mod tp2 file.
- Create a new commit with all modified files. Do not create a new tag for release, it will be created automatically as a 'mod version' and pushed into an online repository.
- Run #ModRelease.bat (Windows) | #ModRelease.command (Mac) | #ModRelease.sh (Linux) and follow further instructions.
Feedback/questions/comments are welcomed.








.jpg)


