GitHub Auto Release
A small PHP script wired to a GitHub service hook that builds a release archive automatically whenever a branch is pushed.
- BPM
- 138
- GRADE
- B
- LEVEL
- 4
- RELEASES
- 0
- YEARS
- 2012–2012
Push, And It Builds
The day after the magazine script, I wrote another quick tool for something that had been bugging me. In February 2012, cutting a release meant remembering to tar the right directory and then remembering where I put it.
github-auto-release was a small PHP script you put on a server and hooked up to GitHub. In your repo's admin panel, under Service Hooks, you pasted the URL with a key in the query string. Push to your branch, GitHub pings the script, the script builds a release archive, and it's there waiting for you. Setup was four steps: open release.php and set your username, password, source, repo, "whatever you want for your key," and what to call the release file.
The password lived in a variable in the PHP file. This was years before GitHub Actions. I wrote a lot of little scripts like this to take a repetitive step out of my week, and put them up in case they helped anyone else.