Set up the repository, keys and store accounts
Purpose
- The one-time setup, in order, before PlayPets can be released and updated:
- the updater signing key
- the GitHub repository and its settings
- the CI secrets
- the Homebrew tap and the winget submission
- the optional signing accounts
- Release a new version assumes this setup is done.
- Managing signing keys and secrets says what each secret does.
- Code signing and distribution channels lists the prices and conditions of the signing programs.
Audience and assumptions
- The maintainer, with:
- a GitHub account (
gaerae) that owns the repository - a password manager (macOS Passwords, 1Password, Bitwarden or similar)
- the GitHub CLI logged in (
gh auth status) - this repository cloned
- a GitHub account (
- Menu names are GitHub's as of 2026.
- On some accounts "Advanced Security" is still labeled "Code security".
| Account or service | Needed for | Cost | Sign-up |
|---|---|---|---|
| GitHub | The repository, CI, releases, the site, the Homebrew tap, winget | Free | Already there |
| Microsoft Contributor License Agreement | The first pull request to winget-pkgs | Free | Agreed in a comment on that pull request (step 11) |
| Apple Developer Program | Signing and notarizing the macOS app (optional) | $99 a year | Step 13 |
| Microsoft Partner Center | Publishing the MSIX in the Microsoft Store (optional) | Free for individuals | Step 14 |
- Homebrew and winget need no account of their own: both are GitHub repositories.
Steps
Check an existing setup first
For an existing repository, inspect it before creating keys or accounts again:
- Locally:
git remote -vandgit status --short. - In the repository's Settings pages: Pages, the default-branch ruleset, workflow permissions, private vulnerability reporting and secret scanning.
- A repository that is configured but empty still needs its first code push before Actions can validate the app and publish the site.
The updater key:
- Do not replace an existing updater key only because GitHub cannot show the secret values again.
- Confirm that the saved public key matches
plugins.updater.pubkey. - Keep its private-key backup.
- Secret names alone do not prove that the private key and password are correct.
- A signed release build and an update test confirm them.
What the local repository already includes:
.gitignore,.gitattributes,.editorconfig,.node-version, Oxlint, Oxfmt and Biome settings, editor recommendations, issue and pull-request templates, Dependabot and review guidance.- Native build, Pages, release, distribution, dependency submission and security workflows.
pnpm testchecks the ignored generated and secret paths, the pinned actions and the Pages input paths.- Run
actionlinttoo when it is available. CODEOWNERSand funding metadata are optional.- Add them when there are review owners or a real funding destination to name.
The updater signing key
- Installed apps accept an update only if it is signed with this key.
- Make it once, with a password, and never lose it.
In the password manager, generate a password of 20 or more random characters and save it in a new entry, such as "PlayPets updater signing key".
Create the key pair. When asked, paste the password twice.
pnpm exec tauri signer generate -w ~/.tauri/playpets-updater.key- It writes
~/.tauri/playpets-updater.key(private, keep secret) and~/.tauri/playpets-updater.key.pub(public). - If an older key is there and has never been in a release, move it aside first.
- Back up the private key next to its password: copy the file's text into the note of the same password manager entry, then clear the clipboard.
pbcopy < ~/.tauri/playpets-updater.keypbcopy < /dev/null- Put the public key in
plugins.updater.pubkeyofsrc-tauri/tauri.conf.json(the whole content of the.pubfile, as it is), runpnpm test, and commit.- The private key and the password never go into the repository or a chat.
The GitHub repository
Create the repository at github.com/new: owner
gaerae, nameplaypets, Public, and add nothing.- No README, license or .gitignore: the repository already has them.
- The name matters: the updater address, the site and the install links all use
gaerae/playpets.
Change these settings before the first push.
| Where | Setting |
|---|---|
| Settings → General → Pull Requests | Turn on Allow squash merging; turn off Allow merge commits and Allow rebase merging. Default squash commit title: Pull request title. Enable Automatically delete head branches |
| Settings → Pages → Build and deployment → Source | GitHub Actions. If the page only lets you choose after a push, re-run the pages workflow from the Actions tab afterwards |
| Settings → Pages → Custom domain | playpets.gaerae.com. Its CNAME points to gaerae.github.io. After the DNS check and certificate finish, turn on Enforce HTTPS |
| Settings → Actions → General → Workflow permissions | Read repository contents and packages permissions; leave "Allow GitHub Actions to create and approve pull requests" off. Enable "Require actions to be pinned to a full-length commit SHA" (every action here is pinned) |
| Settings → Advanced Security | Private vulnerability reporting: Enable. Dependabot alerts and security updates: Enable. Make sure secret scanning and push protection are on |
| Settings → General → Features | Issues on; Wiki, Discussions and Projects off. Social preview: upload website/public/og.png |
| The gear next to About on the repository page | Description A little yard for companions who talk to you and each other. Optional AI connections and coding-agent reactions., website "Use your GitHub Pages website", topics desktop-pet, tauri, codex-pet, claude-code, coding-agent, ollama, rust |
| Settings → General → Releases | Enable Release immutability |
| Settings → Rules → Rulesets | Import the three definitions in .github/rulesets/ |
- Pull requests: review the commit body and keep co-author trailers before merging (commit standard).
- Custom domain: Change the site address has the complete setup and migration checks.
- Private vulnerability reporting:
SECURITY.md, the Code of Conduct and the issue form send reports there. - Release immutability applies to future releases.
- Finish uploading and checking draft assets before publishing.
- After publication, keep their files and tags.
- Ship corrections in the next patch version.
- Rulesets:
| Definition | What it does |
|---|---|
main-history.json | Blocks default-branch deletion and force pushes, without a bypass |
main-review.json | Requires squash PRs, resolved review threads, the six native/site checks, Security checks and CodeQL with no new high-severity security findings or analysis errors |
release-tags.json | Permits new v*.*.* tags but blocks later updates and deletions, with no bypass |
- The Repository admin exception in
main-review.jsonallows only one documented use: pushing the generated release commit directly to main. - The separate history rule still blocks deletion and force pushes for admins.
- Check a tag locally before pushing it.
- A mistaken tag that was pushed stays in history, and a correction uses a new version.
- Enable the required-check and CodeQL rules only after those checks have run successfully.
- The definitions record the checks' exact names and the GitHub Actions application ID.
- Push. Do not push with
--allor--tags.
git remote add origin https://github.com/gaerae/playpets.gitgit push -u origin main- Watch the Actions tab:
build(five platforms andsite),security,codeqlandpagesrun, andpagespublishes https://playpets.gaerae.com/.
Optional, once the code is pushed: automatic reviews from CodeRabbit (free for public repositories).
- Sign in at https://app.coderabbit.ai with GitHub.
- Install its app with Only select repositories →
gaerae/playpets. It reviews every pull request from then on.
- It reads
.coderabbit.yaml(what to review and how), and usesAGENTS.mdanddocs/standards/as its guidelines. - Ask it things in a pull request comment with
@coderabbitai.
CI secrets for signed updates
- Add the key and its password as repository secrets. The second command asks for the value; paste the password from the password manager.
gh secret set TAURI_SIGNING_PRIVATE_KEY --repo gaerae/playpets < ~/.tauri/playpets-updater.keygh secret set TAURI_SIGNING_PRIVATE_KEY_PASSWORD --repo gaerae/playpets- From then on, every release draft includes
latest.jsonand the signed update files.
Homebrew tap
- A tap is your own Homebrew repository.
- Users install with
brew install gaerae/tap/playpets. - The
distributeworkflow updates the cask after every published release.
- Create the tap and its token.
At github.com/new: owner
gaerae, namehomebrew-tap(Homebrew finds it by this name), Public, Add a README file (so it has amainbranch).- One tap holds every app of the account.
- A later app adds its own
Casks/<app>.rbthere, with its own token.
Keep the tap checked:
- a workflow that runs
brew styleandbrew audit --cask --strict --onlineon every push - Dependabot for its actions
- a ruleset on
mainthat blocks deletion and force pushes - Do not require pull requests there:
distributepushes tomaindirectly.
- a workflow that runs
Create a fine-grained token at github.com/settings/personal-access-tokens/new:
Field Value Name playpets homebrew-tapExpiration 1 year Repository access Only select repositories → gaerae/homebrew-tapPermissions Repository permissions → Contents: Read and write Generate the token and save it in the password manager with its expiry date.
Add it to the PlayPets repository (paste the token when asked):
gh secret set HOMEBREW_TAP_TOKEN --repo gaerae/playpets- Until the app is signed with a Developer ID, Homebrew keeps the download quarantined, so the first launch asks for permission as the dmg does.
- The official Homebrew cask repository does not take unsigned apps.
- Until step 13, the account's own tap is the only route.
winget
- winget packages are manifests in
microsoft/winget-pkgs. - The
distributeworkflow writes them. - With a token, it also opens the pull request with
wingetcreate.
- Prepare the fork, the token and the license agreement.
- Fork https://github.com/microsoft/winget-pkgs to the
gaeraeaccount (Fork → Create fork, default branch only).- It is large.
- The fork only serves as the source of pull requests, and every app of the account shares it.
- In the fork's Settings, turn off Actions (Actions → General → Disable actions) so the upstream workflows never run there.
- Turn off Wiki, Issues and Projects too.
- Create a classic token at github.com/settings/tokens/new: note
playpets winget, expiration 1 year, scope public_repo only.- A fine-grained token cannot open a pull request on another owner's repository.
- Save it in the password manager with its expiry date.
- Add it to the PlayPets repository:
- Fork https://github.com/microsoft/winget-pkgs to the
gh secret set WINGET_TOKEN --repo gaerae/playpetsdistributeopens the first pull request after the first release is published.- On that pull request, a Microsoft bot asks for the Contributor License Agreement. Agree by commenting
@microsoft-github-policy-service agreeon it. - winget's moderators review a new package by hand (a few days).
- While that first pull request is open,
distributeopens no other one: each later release would only queue behind it. The run leaves a notice instead. - Once it is merged, run
distributeby hand for the latest tag (gh workflow run distribute.yml -f tag=v<version>), so winget gets the newest version. - Their bots merge later versions once checks pass.
- Users then install with
winget install gaerae.PlayPets.
Reminders
- Tokens expire.
- Add reminders for the two expiry dates (steps 10 and 11) to a calendar, a week early.
- When a reminder comes, create a new token the same way and run the same
gh secret setagain. - The updater key does not expire, so it only needs its backup.
Optional: signing accounts
Apple Developer Program: removes the macOS "unidentified developer" step and makes an official Homebrew cask possible.
Enroll at https://developer.apple.com/programs/enroll/ as an individual with your Apple Account (two-factor authentication on, legal name, $99 a year).
In Certificates, Identifiers & Profiles, create a Developer ID Application certificate, install it in the keychain, and export it as a
.p12with a password.At https://account.apple.com create an app-specific password for notarization.
Note the Team ID from the membership page.
Add the six secrets:
Secret Value APPLE_CERTIFICATEThe .p12in base64:base64 -i cert.p12 | pbcopyAPPLE_CERTIFICATE_PASSWORDThe .p12passwordAPPLE_SIGNING_IDENTITYThe certificate's name, "Developer ID Application: … (TEAMID)" APPLE_IDYour Apple Account APPLE_PASSWORDThe app-specific password APPLE_TEAM_IDThe Team ID - The release workflow needs all six values together.
- It verifies Developer ID trust and notarization.
See the Store and Apple signing guide before building.
Microsoft Store: the Store signs the MSIX, so Store installs have no SmartScreen warning.
- Register as an individual developer at https://partner.microsoft.com/dashboard/registration (free; an ID scan and a selfie).
- Reserve the name "PlayPets", and copy all three identity fields (
Name,Publisher,PublisherDisplayName) from the product identity page. - Follow Prepare Microsoft Store and Apple signing:
- set
MSIX_IDENTITY_NAME,MSIX_PUBLISHERandMSIX_PUBLISHER_DISPLAY_NAME - build the unsigned Store MSIX
- test a separate test-signed package
- prepare the listing and privacy policy
- set
- Store updates are separate from GitHub updates.
- The first registration is manual.
- To submit each published release automatically, follow Submit every release automatically: an Entra app with the Manager role, the
microsoft-storeenvironment, andSTORE_SUBMISSION_ENABLED=true. - The read-only API check does not submit anything.
Verification
- The Actions tab shows
build,security,codeqlandpagesgreen. - https://playpets.gaerae.com/ opens on an
https://address. - The repository page shows the description, the website and the topics.
- Settings → Rules lists the ruleset for
main. - The Security tab shows "Report a vulnerability".
- Settings → Secrets and variables → Actions lists
TAURI_SIGNING_PRIVATE_KEY,TAURI_SIGNING_PRIVATE_KEY_PASSWORD,HOMEBREW_TAP_TOKENandWINGET_TOKEN. - After the first published release:
distributeis green,Casks/playpets.rbis ingaerae/homebrew-tap, and a pull request forgaerae.PlayPetsis open on winget-pkgs.
Troubleshooting
| Symptom | Fix |
|---|---|
pages fails at "Get Pages site failed" | The Pages source is not "GitHub Actions" yet (step 6). Set it and re-run the workflow |
| The security policy's link opens a 404 | Private vulnerability reporting is off (step 6) |
The release draft has no latest.json | The updater secrets are missing or the password is wrong (step 9). Fix them, delete the draft and run release by hand with the same tag |
homebrew in distribute fails to clone or push | gaerae/homebrew-tap does not exist, has no main branch, or the token has expired or lacks Contents write (step 10) |
| The winget pull request is not opened | WINGET_TOKEN is missing, expired, or not a classic token with public_repo, or the fork is missing (step 11). The manifests are still in the run's store-manifests artifact for a manual submission |
| The winget pull request waits with a CLA label | The license agreement comment is missing (step 11) |