Skip to content

inlife/releases

Repository files navigation

releases

A simple web-page/api resource that allows you to display the latest releases to your users and allow them to download them. It is oriented to work with and support private github repositories.

Example page: nexrender.now.sh

It is based on the same idea, design, and principles established by ZEIT's Hazel (which is an amazing tool on it's own).

However this is a more general version with intention to support:

  • Support for any kind of applications/binary artifacts/etc
  • Support of multiple repositories even from different owners (projects) at the same time
  • Support private repositories by default
  • Repository name and owner aliasing (to override the display names for your private repos)
  • Leverages GitHub releases, as well as git tag versioning approach

Instructions

Local development

  1. git clone https://github.com/inlife/releases.git
  2. cd releases
  3. npm install
  4. cp config.dest.json config.json
  5. Edit config to reflect your needs
  6. GITHUB_TOKEN=... npm run dev

Deployment (using now)

  1. now --prod -e GITHUB_TOKEN=...

Additional options

ENV

  • CACHE_DELAY=900000 - cache time for the specific release
  • MAXIMUM_RELEASES=25 - how many releases should be pulled from gihtub and displayed on All releases page

Config

  • config.prereleases=true/false - do you want to display only pre-releases or stable releases

Routes

/

Displays information about latest releas for each one of the configured projects.

/[owner]/[repo]/

Display a set of releases for a specific repository.

/[owner]/[repo]/[version]

Display a detailed information about a specific release, including it's release notes.

You can also provide latest as version name to auto-redirect to the latest available release.

/api

Get infromation in the JSON format about all projects with a single call.

/api/download/[owner]/[repo]/[version]/[assetId]

Get a direct proxied download link for the specific asset (can be retrieved from /api call).

/api/fetch/[onwer]/[repo]/[keyword]/[version]

Auto-guess and get a direct download link for an asset matching provided criteria.

The keyword is used to search for the match inside of the asset label string.

Examples:

Assuming your asset name would look like: myasset-win-server-v12.3.exe, or myasset-linux-worker-1.23.2, both cases below would return the appropriate asset respectively:

  • /api/fetch/inlife/releases/win-serv/latest
  • /api/fetch/inlife/nexrender/linux-worker/1.23.2

By default all releases are cached for 15 minutes. To bust cache (for example right after the release) you can call GET /api?cache=bust

Credits

Huge thanks to Leo Lamprecht (@leo) - ZEIT for creating Hazel

About

Page with latest GitHub releases from private repos

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published