# How to Check If Releases Exist

## Method 1: Via GitHub Web Interface

1. Go to: https://github.com/instructure/inst-agent/releases
2. Check if any releases are listed

**What you should see:**
```
Release 1.0.3
Release 1.0.2
Release 1.0.1
Release 1.0.0
```

Each release should have these files:
- ✅ Instructure Agent-X.X.X-arm64.dmg
- ✅ Instructure Agent-X.X.X-x64.dmg
- ✅ Instructure Agent-X.X.X-arm64.zip
- ✅ Instructure Agent-X.X.X-x64.zip
- ✅ latest-mac.yml

## Method 2: Check GitHub Actions

1. Go to: https://github.com/instructure/inst-agent/actions
2. Look for workflow runs tagged with versions (1.0.0, 1.0.1, etc.)
3. Check if they succeeded ✅ or failed ❌

**Common failures:**
- Missing MACOS_CERTIFICATE secret
- Build errors
- Permission issues

## Method 3: Via Git (you have tags but no releases)

Your tags exist:
```bash
$ git tag
1.0.0
1.0.1
1.0.2
1.0.3
```

But tags ≠ releases! The GitHub Action must run to create releases.

## If No Releases Exist

### Create Your First Release

```bash
# Make sure all changes are pushed
git push origin main

# Delete existing tags (if actions failed)
git tag -d 1.0.0 1.0.1 1.0.2 1.0.3
git push origin --delete 1.0.0 1.0.1 1.0.2 1.0.3

# Create a fresh release
git tag 1.0.0
git push origin 1.0.0
```

Then:
1. Watch GitHub Actions: https://github.com/instructure/inst-agent/actions
2. Wait for it to complete (~5-10 minutes)
3. Check releases: https://github.com/instructure/inst-agent/releases

## If Repo is Private

### Option A: Make Public (Easiest)
Settings → Change visibility → Public

### Option B: Use Personal Access Token

1. Create token: https://github.com/settings/tokens/new
   - Scopes: `repo` (full control)
   - Expiration: No expiration (or set one)

2. Run app with token:
   ```bash
   GH_TOKEN=ghp_your_token_here npm start
   ```

3. Or embed in app (less secure):
   ```typescript
   // In updater.ts
   autoUpdater.requestHeaders = {
     'Authorization': 'token ghp_your_token_here'
   };
   ```

## Testing Checklist

- [ ] Repo exists and is accessible
- [ ] At least one release exists
- [ ] Release has all required files (.dmg, .zip, .yml)
- [ ] App is running in production (not dev mode)
- [ ] If private repo, token is configured
- [ ] Internet connection works
- [ ] No firewall blocking GitHub

## Debug Auto-Update

Check logs at:
```
~/Library/Logs/Instructure Agent/main.log
```

Look for:
```
Checking for updates...
Error in auto-updater: [error details]
```
