Skip to content

Comments

fix: improve release workflow with proper npm publishing#6

Merged
devakone merged 1 commit intomainfrom
fix-release-workflow
Apr 13, 2025
Merged

fix: improve release workflow with proper npm publishing#6
devakone merged 1 commit intomainfrom
fix-release-workflow

Conversation

@devakone
Copy link
Owner

fix: improve release workflow with proper npm publishing

This PR improves the CI/CD workflow to correctly handle the npm publishing process after release PR merges.

Changes

  • Split the release job into two separate jobs:

    • create-release: Handles creating the release PR with release-please
    • publish-npm: Only runs after a release is actually created
  • Fixed the conditional logic to only publish when release-please creates a release

    • Uses releases_created output parameter from release-please
  • Uses the built-in GITHUB_TOKEN for authentication

Benefits

This approach ensures that:

  1. Regular code PRs will trigger release-please to create/update release PRs with version bumps
  2. Only when a release PR is manually merged will the package be published to npm
  3. No version conflicts when trying to publish packages that already exist

This gives proper manual control over the release process while automating version bumping and changelog generation.

@devakone devakone force-pushed the fix-release-workflow branch from f6dcef9 to 1432d37 Compare April 13, 2025 19:09
@devakone devakone merged commit b5b2ed3 into main Apr 13, 2025
3 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.

1 participant