Skip to content

Add CI for submitting plugins to Marketplace on merge#548

Draft
niekert wants to merge 36 commits intoframer:mainfrom
niekert:main
Draft

Add CI for submitting plugins to Marketplace on merge#548
niekert wants to merge 36 commits intoframer:mainfrom
niekert:main

Conversation

@niekert
Copy link
Member

@niekert niekert commented Feb 5, 2026

⚠️ THIS DIFF is messed up because its stacked on top of: #549 and it won't let me change parent branches on forks.

Description

This PR changes github action workflows

Submit on Merge

  • Runs when a PR is merged and the Submit on merge label is active on PR
  • Extracts a Changelog from the PR body
  • Submits a new version of a Plugin for each plugin with changed files

Submit Plugin

  • Manually callable with a pluginPath and changelog input
  • Submits a new version of the given plugin to the marketplace
  • Can be invoked from another repo (eg workshop)
  • Or to submit a plugin if the label was forgotten

Check PR body

  • Already checked if PR body was set
  • If "Submit on merge" label is present it expects a Changelog to be present in the PR body.

framer-plugin-tools

This moves https://github.com/framer/framer-plugin-tools into packages/plugin-tools. It rewrites the script in TS and adds some exports that can be used as well.

Existing plugins now reference the workspace version of plugin-tools too

Checklist

  • Set UP development and production environments in CI and configure secrets and env variables
  • Change development to production in CI jobs after QA
  • Publish a new version of framer-plugin-tools
  • Wait for https://github.com/framer/creators/pull/2487/files to hit production
  • Update Slack workflow to post to #team-plugins instead of #test

Testing

Please test in the niekert/plugins fork. LMK so I can give you QA permissions.

  • Manually submitting a plugin
    • Go to https://github.com/niekert/plugins/actions/workflows/submit-plugin.yml
    • Open the "Run workflow" panel
    • Use plugins/csv-import for the plugin path
    • Fill in a description
    • KEEP DEVELOPMENT ACTIVE (note: only csv-import is currently published on development)
    • Run the job and observe
    • A message should be posted in the #test slack channel when completed.
  • Changelog extraction
    • Check out the niekert/plugins fork locally and create a new branch
    • Make some changes in the CSV import plugin and in another random plugin
    • Notice CI is green
    • Add the "Submit on merge" label
    • Wait for CI to be green again
    • Remove the "### Changelog" Section from the PR
    • Notice CI fails now
    • celebrate and bring back "### Changelog" section
    • Merge the PR when all is green
    • View the Submit On Merge workflow
    • It will submit the csv-import plugin succesfully
    • It will fail for the other plugin (because it doesn't exist on dev)
    • You should see a succesful and an error message on #test in slack.
  • All plugins build succesfully
    • Run yarn build in the root of the repo
    • all plugins succeed building.
    • plugin-tools is automatically built too.

github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'Submit on merge')
# FIXME: Should be production
environment: development
Copy link
Member Author

@niekert niekert Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self to fix before merging.

ERROR_WEBHOOK_URL: ${{ secrets.ERROR_WEBHOOK_URL }}
RETOOL_URL: ${{ secrets.RETOOL_URL }}
# FIXME: Should be production
FRAMER_ENV: development
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should fix

const SubmissionResponseSchema = v.object({
version: v.number(),
// FIXME: THIS SHOULD BE DEPLOYED:
// SEE: https://github.com/framer/creators/pull/2487/files
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: remove the fallback

@niekert niekert force-pushed the main branch 2 times, most recently from 2975293 to cfb070c Compare February 5, 2026 14:03
@niekert
Copy link
Member Author

niekert commented Feb 5, 2026

@cursor review

@niekert
Copy link
Member Author

niekert commented Feb 5, 2026

/gemini review

@niekert
Copy link
Member Author

niekert commented Feb 5, 2026

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@niekert
Copy link
Member Author

niekert commented Feb 5, 2026

@codex review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'Submit on merge')
# FIXME: Should be production
environment: development
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Development environment hardcoded instead of production

High Severity

The workflow has environment: development and FRAMER_ENV: development hardcoded with FIXME comments. The PR notes explicitly state "note to self to fix before merging." If merged as-is, all plugins submitted via the "Submit on merge" flow would go to the development environment instead of production.

Additional Locations (1)

Fix in Cursor Fix in Web


export function runBuildScript(cwd: string): Promise<void> {
return new Promise((resolve, reject) => {
const buildProcess = exec("npm run build", { cwd })
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build script uses npm but plugins require yarn

High Severity

The runBuildScript function executes npm run build, but the plugins in this monorepo have build scripts like "build": "run g:build" where run is yarn's workspace command. When npm executes this script in a shell, it will fail because run is not a recognized command outside of yarn's context.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one. This is what framer-plugin-tools does currently but we can detect the package manager from the lock file.

I will do this in a follow up to not extend the scope of this PR further.

package.json
yarn.lock
.yarnrc.yml
.yarn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sparse checkout missing required .tool-versions file

High Severity

The sparse checkout configuration does not include .tool-versions, but the Setup Node.js step on line 51 requires this file via node-version-file: .tool-versions. The workflow will fail because the file won't exist after the sparse checkout completes.

Fix in Cursor Fix in Web

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cfb070c03c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// 4. Fetch user's plugins to find the database plugin ID
log.step("Fetching Plugin from Framer")
const plugins = await fetchMyPlugins(config)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip Framer API lookup during dry runs

Guard the Framer plugin lookup behind !config.dryRun, because the current flow always calls fetchMyPlugins before the dry-run branch and therefore still requires a valid SESSION_TOKEN and network access. In practice, a dry run configured as documented (without submission secrets) exits early with "Session token is required," so the dry_run workflow input cannot be used for safe validation runs.

Useful? React with 👍 / 👎.

run: yarn turbo run build --filter=framer-plugin-tools

- name: Submit plugin
run: yarn tsx scripts/submit-plugin.ts

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Checkout the workflow repository before running local scripts

For workflow_call, this job currently checks out the caller repository by default, but then executes scripts/submit-plugin.ts from the workspace. That means cross-repo callers (the stated use case) fail unless they coincidentally contain this repo’s scripts/ layout and framer-plugin-tools workspace package. Add an explicit checkout of this repository (or otherwise source the script/tooling) before invoking these commands.

Useful? React with 👍 / 👎.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will focus on cross repo invoking in follow up but good call

@niekert niekert force-pushed the main branch 3 times, most recently from de2c668 to 865b14a Compare February 5, 2026 15:44
huntercaron and others added 21 commits February 5, 2026 20:33
Also removing ref type overwrites
- Improve clarity of effect names
- Better support deletion of multiple files
- Ensure local deletions always require confirmation on resync
- Add packages/plugin-tools with build and pack functionality
- Add g:pack script to root package.json
- Update all plugin package.json files to use workspace dependency
- Keep backwords compatibility but allow specifying additional options
- Add GitHub Actions workflows for plugin submission
- Add scripts for validating PR body and submitting plugins
- Add test:scripts command and related dev dependencies
- Update PR template
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.

3 participants