# GitHub Publishing

The artifact repository is already initialized and committed locally. The remaining GitHub step needs either an existing GitHub remote URL or an authenticated GitHub CLI session.

## Option A: Push to an Existing Empty GitHub Repository

Create an empty repository on GitHub, then run:

```powershell
powershell -ExecutionPolicy Bypass -File repro/publish_to_github.ps1 -RemoteUrl https://github.com/<owner>/<repo>.git
```

The script will set `origin` and push the current `main` branch.

## Option B: Create the GitHub Repository with `gh`

Install and authenticate GitHub CLI first:

```powershell
gh auth login
```

Then run:

```powershell
powershell -ExecutionPolicy Bypass -File repro/publish_to_github.ps1 -RepoName cgrvc-reproducibility-artifact -Private
```

Remove `-Private` to create a public repository.

## Check Current Publish Readiness

```powershell
powershell -ExecutionPolicy Bypass -File repro/publish_to_github.ps1 -CheckOnly
```

The check exits with code `2` when neither `origin` nor `gh` is available. That is expected on machines where GitHub authentication has not been configured.

