Skip to content

Set up GitHub workflow for npm deployment - #5

Open
TommyBez wants to merge 1 commit into
mainfrom
cursor/set-up-github-workflow-for-npm-deployment-4de8
Open

Set up GitHub workflow for npm deployment#5
TommyBez wants to merge 1 commit into
mainfrom
cursor/set-up-github-workflow-for-npm-deployment-4de8

Conversation

@TommyBez

Copy link
Copy Markdown
Owner

A GitHub workflow .github/workflows/deploy.yml was created to automate plugin deployment to npm.

  • Triggers: The workflow runs on pushes to the main branch affecting packages/plugin/ and can be manually dispatched via workflow_dispatch.
  • Deployment Logic:
    • It sets up Node.js and pnpm, caches dependencies, and builds the plugin using pnpm build --filter=stagewise-animation-plugin.
    • A version check compares the current packages/plugin/package.json version against the version published on npm.
    • Publishing to npm and creating a GitHub release only occurs if the version has changed, ensuring deployments happen only on version bumps.
  • The "private": true field was removed from packages/plugin/package.json to enable npm publishing.
  • A deployment-setup.md guide was added, detailing how to configure the required NPM_TOKEN GitHub secret and explaining the workflow's operation and features.

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.

2 participants