Opinionated single-app TypeScript template used by 2060-io.
We use pnpm as the package manager. To install dependencies, run:
pnpm installTo start the development server, use:
pnpm devTo ensure code quality and correctness, run the following commands:
-
Linting:
pnpm check-format
-
Type Checking:
pnpm check-types
-
Run Tests:
pnpm test -
Run Tests in Watch Mode:
pnpm test:watch
To build the project for production, run:
pnpm buildTo run all checks in one command:
pnpm validateThis template ships the standard 2060-io GitHub Actions pipeline, built on the
shared reusable workflows (2060-linter-call, resolve-version-call,
discord-release-notify-call). Use it as a reference for new projects and as the
baseline when upgrading existing ones.
Continuous Integration — .github/workflows/ci.yml
Runs on every pull request and on pushes to main / v* branches:
ci— reusable2060-linter-calljob: build, format check, type check, unit/integration/e2e tests and conventional-commit PR-title validation. Helm chart linting is available viaenable-charts-lint: true(off by default).docker-build— builds the Docker image (without pushing) so image breakage is caught in PRs.
Continuous Deployment — .github/workflows/cd.yml
Dormant by default: every CD job is gated on
vars.CD_ENABLED == 'true'so a fresh repo never publishes to Docker Hub before it's set up. To enable, either add the repo variableCD_ENABLED = true(Settings → Secrets and variables → Actions → Variables) or delete the&& vars.CD_ENABLED == 'true'guards incd.yml. Also add the required secrets (below) and renameIMAGE_NAME/ the chart.
Once enabled, it runs on pushes to main, release/** and v* branches:
resolve-version— reusableresolve-version-calldecides the next version: stable releases via release-please (a merged Release PR) or dev prereleases via semantic-release (any push with releasable commits).docker— builds and pushes the image to Docker Hub with the resolved version plus the floating tags (latest,dev,v<major>,v<major>.<minor>, …).helm— packages and pushes the Helm chart undercharts/to the Docker Hub OCI registry with matching tags.discord-notify— announces stable releases on Discord. A manualworkflow_dispatch(inputnotify_tag) can re-announce any tag.
Versioning is driven by release-please-config.json
and .release-please-manifest.json.
Besides main, the pipeline supports maintenance branches named v1, v1.11,
… which keep an older line alive while main moves on. Two rules make this safe:
- Dev prereleases are anchored to the branch itself (
prerelease-branch: ${{ github.ref_name }}), so a maintenance branch does not reusemain's prerelease sequence. - Cross-line floating tags are only published from
main. A release fromv1.11publishes its immutable version tag and its own minor-line pointer (v1.11), but never moveslatest,v1,dev,v1-devorv1.11-devbackwards.
| Branch | Release | Tags published |
|---|---|---|
main |
stable v2.0.0 |
v2.0.0, v2.0, latest, v2 |
v1.11 |
stable v1.11.5 |
v1.11.5, v1.11 |
main |
dev v2.1.0-dev.3 |
v2.1.0-dev.3, v2.1.0-dev, dev, v2-dev, v2.1-dev |
v1.11 |
dev v1.11.10-dev.2 |
v1.11.10-dev.2, v1.11.10-dev |
| Secret | Used by | Purpose |
|---|---|---|
DOCKER_HUB_LOGIN |
cd.yml |
Docker Hub username / org (also the image & chart namespace) |
DOCKER_HUB_PWD |
cd.yml |
Docker Hub access token |
DISCORD_UPDATES_WEBHOOK_URL |
cd.yml |
Discord webhook for release announcements |
GITHUB_TOKEN is provided automatically by GitHub Actions.
- Rename the image everywhere it is referenced:
IMAGE_NAMEincd.yml, the chart directorycharts/2060-ts-template/andcharts/*/Chart.yaml, andimage.repositoryincharts/2060-ts-template/values.yaml. - Update the
.name/.fullname/.labelshelpers incharts/<name>/templates/_helpers.tplto match the new chart name. - Adjust the
Dockerfileif the app needs a runtime port, extra build artifacts or system packages.service.enabledinvalues.yamlexposes a Kubernetes Service when the app listens on a port. - Set the starting version in
.release-please-manifest.json.