Skip to content

Latest commit

 

History

History
130 lines (97 loc) · 2.48 KB

File metadata and controls

130 lines (97 loc) · 2.48 KB

Publishing Guide

Prerequisites

  1. Check package name availability:

    npm search openqa

    If "openqa" is taken, you'll need to use a scoped name like @auto-browse/openqa

  2. Login to npm:

    npm login

Testing Before Publishing

Option 1: Test with npm pack

# In openqa repo
npm pack
# Creates: openqa-0.0.1.tgz

# In test project
npm install /path/to/openqa-0.0.1.tgz
npm install playwright-bdd @playwright/test
npx openqa init playwright-bdd

Option 2: Publish Beta Version

# In openqa repo
npm version 0.0.2-beta.0
npm publish --tag beta

# In test project
npm install openqa@beta

Publishing to npm

  1. Verify package contents:

    npm pack --dry-run

    This shows what files will be included in the package.

  2. Publish to npm:

    npm publish

    For first-time publish of a public package:

    npm publish --access public

Creating GitHub Release

After publishing to npm, create a GitHub release:

  1. Go to GitHub Actions in your repository
  2. Run the "Release" workflow manually
  3. The workflow will automatically:
    • Create a git tag (v0.0.1)
    • Create a GitHub release
    • Link to the npm package

Or manually create a release:

git tag v0.0.1
git push origin v0.0.1

Then create the release on GitHub UI.

Pre-Publish Checklist

Before publishing, ensure:

  1. ✅ All tests pass
  2. ✅ Tested with npm link or npm pack
  3. ✅ CLI tool works: npx openqa init playwright-bdd
  4. ✅ README is up to date
  5. ✅ Branch merged to main
  6. ✅ Version bumped appropriately

Version Updates

When releasing new versions:

  1. Merge feature branch to main:

    git checkout main
    git merge feat/your-feature
  2. Update version in package.json:

    npm version patch  # 0.0.1 -> 0.0.2 (bug fixes)
    npm version minor  # 0.0.1 -> 0.1.0 (new features)
    npm version major  # 0.0.1 -> 1.0.0 (breaking changes)

    This automatically:

    • Updates package.json
    • Creates a git commit
    • Creates a git tag
  3. Push to GitHub:

    git push && git push --tags
  4. Publish to npm:

    npm publish
  5. Run GitHub Release workflow (optional)

Verify Publication

After publishing, verify: