Publishing
AIDK is published to GitHub Packages as a private package (@aquaringlab/aidk). The complete process is described below.
Prerequisites
- You must have
write:packagespermission on theaquaringlabGitHub organization. - You must have a GitHub Personal Access Token (PAT) with
write:packagesscope. - The
.npmrcfile must be correctly configured.
Step 1: Create a GitHub PAT
Go to github.com/settings/tokens → Generate new token (Classic).
Select the following scopes:
write:packagesread:packagesrepo
Step 2: Configure .npmrc
Add the following to your local ~/.npmrc:
@aquaringlab:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
Do not commit real tokens to .npmrc. Use ~/.npmrc or environment variables.
Step 3: Build Before Publishing
npm run build
Verify the build output in the dist/ directory.
Step 4: Bump the Version
Use npm version to update package.json following Semantic Versioning:
# Patch (0.2.0 -> 0.2.1)
npm version patch
# Minor (0.2.0 -> 0.3.0)
npm version minor
# Major (0.2.0 -> 1.0.0)
npm version major
Step 5: Publish
npm publish
The prepublishOnly script in package.json will automatically run npm run build before publishing.
Automated Publishing via GitHub Actions
The manual process above is for emergency cases only. Normally, publishing is done automatically via GitHub Actions when a v* tag is pushed to the aquaringlab/lab-tool-ai-kit repository.
git tag -a v0.16.0 -m "chore: release v0.16.0"
git push aql main --follow-tags
Verify After Publishing
After publishing, confirm the package appears at:
- GitHub Packages:
https://github.com/aquaringlab/lab-tool-ai-kit/packages - Or try installing it:
npm install -g @aquaringlab/aidk@<version>
Update the CHANGELOG
Always update CHANGELOG.md before publishing to document the changes in the new version.