This repository provides a small release flow using a dedicated manual pipeline and release-triggered publishers.
Primary workflow used for releases
- Manual release pipeline (Actions → "Manual release pipeline") — preferred manual entrypoint.
- Inputs:
level:patch|minor|major(default:patch)branch: branch to release from (default:release)
- What it does:
- Checks out the specified branch.
- Runs
npm version <level>which updatespackage.json, creates a commit and a tag. - Pushes the commit and tag to the remote.
- Exits; the repository
releaseevent (tag/release published) will trigger the publishing workflows.
- Inputs:
Release-triggered workflows
-
publish.yml(trigger:release: published) — builds and publishes packages to:- npmjs.org (uses
NPM_TOKENsecret) - GitHub Packages (scoped package:
@reicek/neataptic-ts)
- npmjs.org (uses
-
deploy-pages.yml(trigger:release: published) — runsnpm run docsand publishesdocs/to thegh-pagesbranch.
Required repository secrets
NPM_TOKEN— npm auth token with publish rights (add at Settings → Secrets → Actions).GITHUB_TOKEN— automatically provided to Actions (no manual setup required) and used for GitHub Packages and Pages deploy.
How to publish a new release (recommended)
- Ensure your release branch (default
release) contains the changes you want to publish. - Go to the repository Actions tab, choose "Manual release pipeline" and click "Run workflow".
- Select
level(patch/minor/major) andbranch(e.g.,release), then run. - The workflow will create a tag and push it. After the tag is pushed, GitHub will fire the
releaseevent and thepublishanddeploy-pagesworkflows will run automatically.
Verification after release
- npm: check https://www.npmjs.com/package/@reicek/neataptic-ts for the published version.
- GitHub Packages: check the Packages tab on the repository.
- Docs: check https://reicek.github.io/NeatapticTS/ after the
gh-pagesdeploy completes.
Troubleshooting & notes
-
Branch protection: if the chosen branch has protection rules that prevent the Actions bot from pushing commits/tags, the manual pipeline may fail to push. In that case you can:
- Temporarily allow Actions to push, or
- Use a PAT (personal access token) stored as a secret and update the workflow to use it for pushing, or
- Create the tag locally and push it from your machine.
-
Avoid duplicate publishers: the manual pipeline intentionally only bumps/tags/pushes and does not publish directly — the
publishanddeploy-pagesworkflows run on thereleaseevent and perform the actual publishing steps once. -
If you'd like a single workflow to perform bump+publish+deploy in one run (instead of splitting by event), tell me and I can convert the manual pipeline to do everything and remove the release-triggered workflows.
If you want I can also add automatic changelog generation (from commits) and include the generated release notes in the GitHub Release body.