# GitHub integration

Connect a repository and every **GitHub Release** you publish becomes a Dweller release: assets are copied to the Dweller CDN, the tag becomes the version, the release body becomes the notes, and every player's launcher updates.

## Set it up (2 minutes)

1. Open your game on the [dashboard](https://dweller.games/dashboard) → **GitHub** tab.
2. Enter the repository (`owner/name`). For private repos, add a fine-grained token with **read-only access to Contents** on that repo.
3. Leave **Check for new releases automatically** on. Dweller checks about every 10 minutes, no webhook needed.
4. Click **Import latest release now** to pull your current release immediately.

### Instant imports (optional webhook)

The GitHub tab shows a webhook URL and secret. In the repo: **Settings → Webhooks → Add webhook**, paste both, content type `application/json`, and select only the **Releases** event. New releases then import within seconds.

## Naming your release assets

Dweller picks the platform from each asset's file name:

| Asset name contains | Platform |
|---|---|
| `windows`, `win`, or ends in `.exe`/`.msi` | Windows |
| `mac`, `macos`, `darwin`, `osx`, or ends in `.dmg` | macOS |
| `linux`, or ends in `.AppImage`/`.x86_64`/`.deb` | Linux |
| `web`, `html5`, `wasm` | Web (playable in browser) |
| ends in `.apk` | Android |
| ends in `.gba` | Game Boy Advance |

`arm64`/`aarch64` and `universal` in the name set the architecture. Checksums, signatures and text files are ignored.

Example release: `v1.3.0` with assets `Starfall-windows.zip`, `Starfall-macos-universal.zip`, `Starfall-linux.zip`, `Starfall-web.zip`.

## Building in GitHub Actions

Prefer to build in CI and push directly? Use the CLI with a `DWELLER_TOKEN` repository secret:

```yaml
name: Release to Dweller
on:
  push:
    tags: ['v*']
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # …build your game into build/windows, build/linux, build/web…
      - run: curl -fsSL https://dweller.games/install-cli.sh | sh
      - run: ~/.local/bin/dweller push --version "${GITHUB_REF_NAME#v}" --notes-file CHANGELOG.md
        env:
          DWELLER_TOKEN: ${{ secrets.DWELLER_TOKEN }}
```

## Sign in with GitHub

If the site operator has enabled it, you can sign up and sign in with your GitHub account, and link GitHub to an existing account under **Settings → Email & password**.
