Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nettalco/nettalco-theme/llms.txt
Use this file to discover all available pages before exploring further.
@nettalco/nettalco-theme follows Semantic Versioning and is published to the GitHub Packages npm registry (https://npm.pkg.github.com) under the @nettalco scope. The repository includes a publish.ps1 PowerShell script that automates the full release cycle — version bump, build, publish, git commit, and tag — in a single command. This page documents the script, explains each step, and provides a manual alternative for CI environments.
Package Details
| Property | Value |
|---|---|
| Package name | @nettalco/nettalco-theme |
| Current version | 1.1.1 |
| Registry | https://npm.pkg.github.com |
| Build command | ng-packagr -p ng-package.json (aliased as npm run build) |
publish.ps1 — The Automated Release Script
Thepublish.ps1 script lives at the root of the library project. Run it from within the library directory with one optional argument: the version bump type.
Usage
| Argument | Effect | Example: 1.1.1 → |
|---|---|---|
patch (default) | Increments the patch version | 1.1.2 |
minor | Increments the minor version, resets patch | 1.2.0 |
major | Increments the major version, resets minor and patch | 2.0.0 |
Full Script
publish.ps1
What the Script Does Step by Step
Runs
git status --porcelain. If there are unstaged or uncommitted files, it prints a warning and prompts for confirmation. You can choose to continue or abort. This prevents accidentally publishing with dirty working-tree state.Deletes the entire
dist/ folder with Remove-Item -Recurse -Force dist. This ensures no stale build artefacts from previous builds are included in the published package.Runs
npm version patch|minor|major --no-git-tag-version. The --no-git-tag-version flag tells npm to update package.json only, without creating a git commit or tag (the script handles those steps manually later). The new version string is then read back from package.json.Runs
npm run build, which internally executes ng-packagr -p ng-package.json. The compiled output lands in dist/nettalco-theme/ in Angular Package Format (APF), including ESM2022 and FESM2022 bundles, type declarations, and a package.json ready for publication.Copies the project-root
.npmrc file into dist/nettalco-theme/. This ensures the npm publish command — run from inside dist/ — has access to the GitHub Packages registry URL and auth token.Changes directory into
dist/nettalco-theme/ and runs npm publish --verbose. The publishConfig.registry in the library’s package.json points to https://npm.pkg.github.com, so the package lands in the @nettalco scope on GitHub Packages.Stages
package.json, creates a commit with the message chore: bump version to X.Y.Z, and creates an annotated tag vX.Y.Z. Note: the script does not push automatically — you must run the following manually:Manual Publish Steps
For CI environments (GitHub Actions, Azure Pipelines, etc.) where PowerShell scripts are not ideal, you can replicate the same process with these shell commands:In GitHub Actions,
GITHUB_TOKEN is automatically provided as a repository secret. You do not need a personal access token for publishing from a workflow — configure your .npmrc to use ${GITHUB_TOKEN} and set env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} on the publish step. See Authentication for a complete workflow example.