Skip to content

fix: improve release workflow to publish only after release PR merge #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 13, 2025

Conversation

devakone
Copy link
Owner

fix: improve release workflow

This PR improves the CI/CD workflow to ensure that npm packages are only published after the release-please PR is merged.

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
  • Updated the token for release-please to use GH_TOKEN

Testing

This change has been tested by reviewing the logic against the release-please documentation.

After merging:

  1. Future PRs to main will trigger release-please to create a release PR
  2. Only when that release PR is manually merged will the package be published

@devakone devakone force-pushed the fix-release-workflow branch from 629772f to 4c14c91 Compare April 13, 2025 19:01
@devakone devakone merged commit 9ddf836 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