GitHub Actions Secrets Configuration
April 30, 2026 ยท View on GitHub
This document lists the GitHub secrets and external credentials required by the templjs workflows.
This is the credential reference.
- use ../docs/release-process.md for recurring branch and release operations
- use organization-setup.md for one-time repository and environment setup
Release-note source of truth (fully mechanized):
- pull request title/body messaging (including
Release note:lines) - commit subject/body messaging
- release note templates in
scripts/release/templates/*.md.tmpl
Release automation follows a branch-aware model:
- pushes to
stagingpublish prerelease artifacts automatically- npm packages publish to dist-tag
next - the VS Code extension publishes as a Marketplace prerelease
- npm packages publish to dist-tag
- pushes to
mainmaintain the Changesets version PR - published GitHub Releases created from stable tags on
mainpublish stable artifactsvX.Y.Ztags publish npm package releasesvscode-vX.Y.Ztags publish VS Code extension releases
Required Secrets
Configure these secrets in GitHub: Settings -> Secrets and variables -> Actions.
npm Publishing
No npm token secret is required.
templjs uses npm trusted publishing through GitHub Actions OIDC:
- workflow:
.github/workflows/release.yml - GitHub environments:
prereleaserelease
- required GitHub job permission:
id-token: write
Manual npm setup is still required once per package:
- Run
./.github/scripts/prepare-npm-trusted-publishing.sh - Open each printed npm package settings page
- Add GitHub as a trusted publisher
- Use:
- owner:
templjs - repository:
templ.js - workflow filename:
release.yml - environment name: leave blank
- owner:
Published npm packages:
@templjs/core@templjs/cli@templjs/volar@templjs/context-graph
VS Code Extension Publishing
VSCODE_PUBLISHER_TOKEN (Required)
- Purpose: publish the VS Code extension to the Visual Studio Marketplace
- Where used:
release.yml - How to obtain:
- Go to https://dev.azure.com
- Create a Personal Access Token with
Marketplace -> Manage - Ensure the PAT owner is a member of the
templjspublisher with publish access - Copy the token
- Where to set: repository Actions secrets
- Reference: https://code.visualstudio.com/api/working-with-extensions/publishing-extension
Versioning note:
stagingprereleases use CI-generated plain semver versions- stable releases use
vscode-vX.Y.Ztags onmain - prerelease and stable publishes must not reuse the same extension version
Backlog Automation
Backlog automation uses the default GITHUB_TOKEN for repository reads and writes.
DOC_VADER_APP_ID (Required for sweep app-auth mode)
- Type: repository Actions variable (not a secret)
- Purpose: GitHub App ID used to mint an installation token for protected-branch sweep pushes
- Where used:
.github/workflows/backlog-automation.ymlvia reusable workflow inputapp-id - Where to set: repository
Settings -> Secrets and variables -> Actions -> Variables
DOC_VADER_PRIVATE_KEY (Required for sweep app-auth mode)
- Purpose: GitHub App private key PEM used to mint an installation token for protected-branch sweep pushes
- Where used:
.github/workflows/backlog-automation.ymlvia reusable workflow secretapp-private-key - Where to set: repository Actions secrets as
DOC_VADER_PRIVATE_KEY
PACKAGES_READ_TOKEN (Optional fallback)
- Purpose: fallback token for reading packages (for example
calan-co/doc-vader) when the defaultGITHUB_TOKENdoes not have package-read access - Where used:
.github/workflows/backlog-automation.ymlvia reusable workflow secretpackages-read-token - Typical use case: repositories outside the
calan-coorganization that cannot read upstream packages with the default token - Required scope/permission: package read access (for example classic PAT with
read:packages) - Where to set: repository Actions secrets as
PACKAGES_READ_TOKEN
Code Coverage
CODECOV_TOKEN (Optional but recommended)
- Purpose: upload test coverage reports to Codecov
- Where used:
ci.yml - How to obtain:
- Sign in at https://codecov.io
- Add the repository
- Copy the upload token from repository settings
- Where to set: repository Actions secrets
Secrets Summary
| Secret Name | Required | Used In | Purpose |
|---|---|---|---|
DOC_VADER_PRIVATE_KEY | Conditional | backlog-automation.yml | GitHub App private key for protected-branch sweep pushes |
VSCODE_PUBLISHER_TOKEN | Yes | release.yml | Publish VS Code extension |
PACKAGES_READ_TOKEN | Optional | backlog-automation.yml | Fallback package-read token for backlog reusable workflows |
CODECOV_TOKEN | Recommended | ci.yml | Upload coverage reports |
Repository variable summary for backlog automation:
| Variable Name | Required | Used In | Purpose |
|---|---|---|---|
DOC_VADER_APP_ID | Conditional | backlog-automation.yml | GitHub App ID for protected-branch sweep token minting |
Default GitHub Secrets
These are provided automatically by GitHub:
GITHUB_TOKEN- used for: version PR maintenance, release updates, PR comments, artifact metadata
Validation
Do not use stable tags as a credential smoke test. A published GitHub Release from vX.Y.Z or vscode-vX.Y.Z will attempt a real stable release.
Use non-publishing checks first:
- npm trusted publishing:
- run
./.github/scripts/prepare-npm-trusted-publishing.sh - verify the printed package list and trusted-publisher values
- run
- VS Code publisher token:
- run
npx --yes @vscode/vsce verify-pat templjs
- run
- Codecov:
- push a normal commit and confirm coverage upload in CI
Use real release tags only when intentionally performing a release.
Troubleshooting
npm Publishing Fails
- Verify trusted publishing is configured for each
@templjs/*package - Verify the trusted publisher points to
templjs/templ.js - Verify the trusted publisher workflow filename is
release.yml - Leave the trusted publisher environment name blank so both
prereleaseandreleasejobs can publish - Ensure the
@templjsscope and package names already exist on npm when required
VS Code Publishing Fails
- Verify the PAT has
Marketplace: Manage - Verify the PAT owner has permission under the
templjspublisher - Ensure the PAT is not expired
- For
staging, remember the workflow computes an ephemeral plain semver prerelease version in CI - For stable releases, ensure
src/extensions/vscode/package.jsonmatches thevscode-vX.Y.Ztag exactly
Codecov Upload Fails
- Verify the repository is configured in Codecov
- Verify coverage artifacts are generated
- Verify
CODECOV_TOKENis set when required