The most gigachad project setup for TypeScript.
- Containerize with Docker
- Deliver continuously with GitHub Workflow
- Document with TypeDoc
- Enforce format-on-save in VSCode
- Execute workflows locally with
act
- Format with Prettier
- Lint code with ESLint
- Lint markdown with markdownlint
- Manage packages with pnpm
- Pledge your respect with the Contributor Covenant
- Run with tsx
- Test units with Vitest
- Update dependencies with Dependabot
This template offers a GitHub Workflow to help you automatically bump the version number, tag it, push it, and publish it to both NPM, the GitHub Package Registry and in GitHub Releases on the click of a button.
To make the git push
work, you'll need to use a Deploy Key.
-
Genereate a SSH key with https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key
ssh-keygen -t ed25519 -C "@natoboram/gigachad.ts" -f new_ssh_key -N ""
-
Add the private key to your project's secrets at
/settings/secrets/actions/new
with the nameDEPLOY_KEY_PRIVATE
-
Add the public key to your project's variables at
/settings/variables/actions/new
with the nameDEPLOY_KEY_PUBLIC
-
Add the public key to your project's deploy keys at
/settings/keys
-
Add the public key to
.github/authorized_keys
in the format of41898282+github-actions[bot]@users.noreply.github.com <DEPLOY_KEY_PUBLIC>
while replacing<DEPLOY_KEY_PUBLIC>
with your public key -
Delete the key pair from your computer, never to be seen again
The .github/authorized_keys
is used to sign and verify the signature of the build artefact that is sent to GitHub Releases. If you want to skip this step, you can remove it from .github/workflows/pnpm-publish.yaml
.
To publish on NPM, you'll need to provide your NPM token.
- Sign in to https://www.npmjs.com
- Access Tokens / Generate New Token / Classic Token / Automation / Generate Token
- Copy that token and save it in your project's secrets at
/settings/secrets/actions/new
with the nameNODE_AUTH_TOKEN