π₯ Download AutoUpdateGitHubModules.ps1
A PowerShell script that watches a list of GitHub repos and keeps their latest Release .zip saved locally β one folder per module. When a new release comes out, it deletes the old zip and saves the new one automatically. No extraction, no source code, just the release asset itself.
Built for keeping flashable modules (e.g. Magisk/KernelSU) up to date, but works for any repo that publishes zip files in its GitHub Releases.
# What it does
- Checks you have an internet connection
- For each configured module, fetches the latest GitHub release
- Skips any asset with "debug" in the filename automatically
- Picks the right file using a wildcard pattern (useful when one release has multiple zip variants)
- If that file isn't already downloaded, deletes the old zip in that module's folder and saves the new one
- Writes a fresh log every run β old log entries are cleared each time
# Requirements:-
- patience: The most important part of Human aspect
- Understanding the code and just touch or edit the given part highlighted
- Understand the given guide
# Setup:-
- Download AutoUpdateGitHubModules.ps1
- Open it in Notepad (or any text editor) and edit the $Modules list β one entry per repo you want tracked:
@{ Name = "my-module"; RepoUrl = "owner/repo"; LocalPath = "D:\Modules\my-module"; AssetPattern = "*.zip" }| Field | What it is |
|---|---|
Name |
Label used in the log β can be anything |
RepoUrl |
The repo as owner/repo (not the full GitHub URL) |
LocalPath |
Local folder where that module's zip gets saved |
AssetPattern |
Wildcard to pick the right file. Use "*.zip" if the repo only has one zip per release. Use something more specific (e.g. "*windows*.zip") if a release has multiple zip variants and you only want one |
- Set $LogFile to wherever you want the run log saved
- Test it manually first:
powershell -ExecutionPolicy Bypass -File ".\AutoUpdateGitHubModules.ps1"
- Check the log file it creates to confirm each module updated correctly
To have it run on its own instead of manually:
-
Open Task Scheduler β click Create Task in the right-hand Actions panel (not "Create Basic Task")
-
General tab: give it a name (e.g. "GitHub Module Updater"). Under Security options, leave "Run only when user is logged on" selected β this runs the task silently in the background while you're logged in, no password needs to be stored
-
Triggers tab β click New,
add triggers:
Begin the task: On a schedule β Daily
Check "Repeat task every" β set to 1 hour
Set "for a duration of" β Indefinitely
- Actions tab β click New:
Action:
Start a program
Program/script: powershell.exe
Add arguments: -ExecutionPolicy Bypass -File "C:\path\to\AutoUpdateGitHubModules.ps1" (use your script's actual saved location)
-
Click OK to save the task
-
Right-click the task in the list β Run, to test it immediately instead of waiting for a trigger. Check your log file afterward to confirm it worked
From then on it checks and updates itself whenever you're online β no manual steps needed. be happy in life LOL! :)
# Notes:-
-
This only handles downloading/replacing the release zip files. It doesn't install, extract, or flash anything for you.
-
A module's zip only gets re-downloaded when the release's asset filename actually changes (since most projects bake the version into the filename). If a repo re-uploads a same-named file for a hotfix, delete that module's zip manually to force a re-check.
-
If a module you add already has existing files in its folder when you first run the script, they're left untouched on that first run β only future new releases will trigger a replace.