Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Dec 21, 2025

Summary

This PR adds complete CI/CD workflows and release automation for both JavaScript and Python packages, fully integrated with the templates from:

JavaScript CI/CD (.github/workflows/js.yml)

All features from the template:

  • Changeset validation for PRs
  • Linting with ESLint, Prettier, and jscpd
  • Testing on Node.js 22 across Ubuntu, macOS, and Windows
  • Automated npm publishing with OIDC trusted publishing
  • Manual release support (instant and changeset-pr modes)
  • Complete release automation with GitHub releases

Python CI/CD (.github/workflows/python.yml)

All features from the template:

  • Changelog fragment validation using scriv
  • Linting with Ruff and type checking with mypy
  • Testing with pytest and coverage reporting (with Codecov integration)
  • Automated PyPI publishing with OIDC trusted publishing
  • Manual release support with version bumping
  • Complete release automation with GitHub releases

Configuration Files Added

JavaScript

  • .changeset/ - Changeset configuration and files
  • .prettierrc, .prettierignore - Prettier formatting rules
  • .jscpd.json - Code duplication detection config
  • eslint.config.js - ESLint linting rules

Python

  • changelog.d/ - Scriv changelog fragments
  • .ruff.toml - Ruff linting and formatting config
  • .pre-commit-config.yaml - Pre-commit hooks configuration

Scripts Added

JavaScript (js/scripts/)

  • changeset-version.mjs - Version management with changesets
  • create-github-release.mjs - GitHub release creation
  • create-manual-changeset.mjs - Manual changeset creation
  • format-github-release.mjs - Release notes formatting
  • format-release-notes.mjs - Release notes generation
  • instant-version-bump.mjs - Quick version bumping
  • publish-to-npm.mjs - npm publishing with OIDC
  • setup-npm.mjs - npm configuration for trusted publishing
  • validate-changeset.mjs - Changeset validation
  • version-and-commit.mjs - Version updates and commits

Python (python/scripts/)

  • bump_version.py - Version bumping utility
  • check_file_size.py - File size validation
  • create_github_release.py - GitHub release creation
  • create_manual_changeset.py - Manual changelog fragment creation
  • format_release_notes.py - Release notes formatting
  • publish_to_pypi.py - PyPI publishing
  • validate_changeset.py - Changelog fragment validation
  • version_and_commit.py - Version updates and commits

Package Updates

JavaScript (package.json)

Added dev dependencies:

  • @changesets/cli - Changeset management
  • eslint, eslint-config-prettier, eslint-plugin-prettier - Linting
  • husky - Git hooks
  • jscpd - Code duplication detection
  • lint-staged - Staged file linting
  • prettier - Code formatting

Python (pyproject.toml)

Added dev dependencies:

  • scriv[toml] - Changelog management (equivalent to changesets)

CI Status

All workflows are passing:

  • ✅ JavaScript CI/CD
  • ✅ Python CI/CD
  • ✅ Tests

Next Steps

Once merged, the automated release workflows will:

  1. Detect version changes in package.json or pyproject.toml
  2. Automatically publish to npm and PyPI
  3. Create GitHub releases with formatted changelog

For manual releases:

  • JavaScript: Use workflow_dispatch on js.yml with instant or changeset-pr mode
  • Python: Use workflow_dispatch on python.yml with version bump type

Fixes

Fixes #15


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #15
@konard konard self-assigned this Dec 21, 2025
konard and others added 7 commits December 21, 2025 18:40
Fully integrated CI/CD pipelines following the templates:
- js-ai-driven-development-pipeline-template
- python-ai-driven-development-pipeline-template

JavaScript (js.yml):
- Changeset validation for PRs
- Linting with ESLint, Prettier, and jscpd
- Testing on Node.js across Ubuntu, macOS, and Windows
- Automated npm publishing with OIDC trusted publishing
- Manual release support (instant and changeset-pr modes)
- Complete release automation with GitHub releases

Python (python.yml):
- Changelog fragment validation using scriv
- Linting with Ruff and type checking with mypy
- Testing with pytest and coverage reporting
- Automated PyPI publishing with OIDC trusted publishing
- Manual release support with version bumping
- Complete release automation with GitHub releases

Configuration files added:
- JS: .changeset/, .prettierrc, .prettierignore, .jscpd.json, eslint.config.js
- Python: changelog.d/, .ruff.toml, .pre-commit-config.yaml

Scripts added for both languages:
- Version management and changelog collection
- Publishing to npm/PyPI
- GitHub release creation and formatting
- Changeset/fragment validation

All changes pass local CI checks:
- Python: ruff check, ruff format, mypy
- JavaScript: eslint, prettier, tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add required changeset file for the PR to pass CI checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Limit ruff check and format to src/ and tests/ directories,
excluding experiments/ which contains temporary files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The validation script requires single quotes around the package name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change from 'tests/' to 'tests/*.test.js' for compatibility
with Node.js v22 test runner.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update PACKAGE_NAME from 'my-package' to 'lino-objects-codec'
to match the actual package name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Run Prettier to fix code style issues in README.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Make sure it is published, and CI/CD also works Add complete CI/CD workflows and release automation Dec 21, 2025
@konard konard marked this pull request as ready for review December 21, 2025 17:52
@konard
Copy link
Member Author

konard commented Dec 21, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $5.374535 USD
  • Calculated by Anthropic: $3.334385 USD
  • Difference: $-2.040149 (-37.96%)
    📎 Log file uploaded as GitHub Gist (793KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit a15a617 into main Dec 21, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sure it is published, and CI/CD also works

2 participants