Distribute your GitHub releases in your closed-source projects.
Constellation works by querying GitHub to fetch releases created in your private projects.
- bun
- GitHub personal access token with read access to your repositories
To ensure that Constellation is able to parse your releases for version, platform and target CPU architecture - ensure that your release filenames follow this naming convention.
$application_name-$version-$platform-$architecture
constellation-v0.1.0-darwin-aarch64.zip
This will probably change in the future.
Using either a .env
file in Constellation's root directory, or exporting variables using Docker or your favorite shell, set the following variables:
GITHUB_TOKEN
- containing your private access tokenJWT_SECRET_KEY
- a strong key used to sign JWT tokens
bun install
services:
constellation:
container_name: constellation
image: goats2k/constellation:0.2.0
restart: unless-stopped
environment:
- GITHUB_TOKEN=<your-pat-here>
- JWT_SECRET_KEY=<your-secret-key-here>
ports:
- 127.0.0.1:8000:8000
Constellation uses a claim in the supplied bearer token to figure out what repository it should look for releases in.
This is to make sure the application is only able to fetch releases from its own repository and to make enumeration of other projects impossible.
To generate a token pointing to a repository, run the following command:
bun run create-token <repository-name>
Alternatively, if running via Docker, after setting up the image:
docker exec -it constellation bun run create-token <repository-name>
Which will output the following:
JWT token for <repository-name>: <your token here>
bun start
docker compose up -d
Set the token from the create-token
command in an Authorization header.
Authorization: Bearer <token>
Constellation exposes the following endpoints for updates:
- GET
/versions
- This returns every release available in your repository.
- GET
/versions?includePrerelease=true
- This returns every release, including prereleases, available in your repository.
- GET
/versions/<version>?platform=<platform>&arch=<arch>
- This returns the actual release with a download link.