Announce to the engineering team that you are releasing at least 1 day ahead of time unless this is a scheduled release.
git checkout main
git pull
Update the version number in package.json
.
Run tests and build to make sure everything is working:
npm test
npm run build
Create a commit with the message Release {version}
and push:
git add package.json
git commit -m "Release {version}"
git push origin main
Navigate to the repository's Releases page: https://github.com/DataSQRL/acorn.js/releases
Click "Create a new release" and fill in the following:
- Tag version: {version} (e.g., 1.2.0)
- Release title: {version}
- Description: List major changes, features, and bug fixes
Click "Publish release" to create the release.
The repository has a GitHub Action workflow set up that automatically:
- Triggers when a release is created in GitHub
- Checks out the code
- Sets up Node.js
- Installs dependencies
- Runs tests
- Builds the package
- Publishes to NPM
The workflow file is located at .github/workflows/release.yml
.
For the automated release to work, you need to set up an NPM token:
- Create an NPM access token with publish permissions
- Add the token as a secret in your GitHub repository:
- Go to Repository Settings > Secrets and variables > Actions
- Add a new secret with name
NPM_TOKEN
and the token value
Verify the package is published on NPM: https://www.npmjs.com/package/@datasqrl/acorn
npm install @datasqrl/acorn@latest
Test the new version in a real project to confirm it works as expected.
Announce that the release is complete.