Publishing docker-to-iac module to NPM
The docker-to-iac module is published to the @deploystack organization on NPM. The publishing process is automated through GitHub Actions and follows a conventional commit-based workflow.
Release Process Overview
The release process follows these steps:
- Initiate a release preparation using the GitHub workflow
- Review and merge the release pull request
- Automatic publishing to NPM when the release PR is merged
Starting a Release
Releases can be initiated through the GitHub Actions UI:
- Navigate to the "Actions" tab in the repository
- Select the "Release Process" workflow
- Click "Run workflow"
- Choose the release type:
patch (bug fixes)
minor (new features)
major (breaking changes) - Optionally select "Prerelease" for beta versions
- Click "Run workflow"
What Happens During Release Preparation
The workflow performs the following steps:
- Updates the version in package.json based on conventional commits
- Updates the CHANGELOG.md file with details of changes since the last release
- Creates a new branch with these changes (named release-v{version})
- Provides a link to create a pull request
Creating the Pull Request
After the workflow completes:
- Follow the link provided in the workflow output to create a pull request
- Important: Add the release label to your pull request
- Request a review of the PR
Publishing Process
When the pull request with the release label is merged:
- The GitHub Action automatically creates a Git tag for the new version
- A GitHub release is created with the changelog contents
- The package is built using npm run build
- The package is published to NPM with public access
Npm Package
The published package is available at: https://www.npmjs.com/package/@deploystack/docker-to-iac
Conventional Commits
The project uses conventional commits to determine version bumps and generate changelogs. Commit messages should follow this pattern:
- feat: ... - A new feature (minor version bump)
- fix: ... - A bug fix (patch version bump)
- chore: ... - Maintenance changes
- docs: ... - Documentation changes
- style: ... - Code style changes
- refactor: ... - Code refactoring
- perf: ... - Performance improvements
- test: ... - Test updates
Breaking changes should include BREAKING CHANGE: in the commit message body or footer.
Configuration Files
The release process is configured through several files:
- .github/workflows/release-pr.yml - GitHub Actions workflow
- .release-it.js - Configuration for release-it
- package.json - NPM scripts for the release process