Submit Plugin #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Submit Plugin | |
| on: | |
| # Manual trigger from GitHub UI | |
| workflow_dispatch: | |
| inputs: | |
| plugin_path: | |
| description: 'Plugin directory (e.g., plugins/csv-import)' | |
| required: true | |
| type: string | |
| changelog: | |
| description: 'Changelog for this release' | |
| required: true | |
| type: string | |
| environment: | |
| description: 'Environment (development/production)' | |
| required: true | |
| default: 'development' | |
| type: choice | |
| options: | |
| - development | |
| - production | |
| dry_run: | |
| description: 'Dry run (skip submission and tagging)' | |
| required: false | |
| default: false | |
| type: boolean | |
| # Reusable workflow - can be called from other repos | |
| workflow_call: | |
| inputs: | |
| plugin_path: | |
| description: 'Plugin directory relative to repo root (e.g., "plugins/csv-import" or ".")' | |
| required: true | |
| type: string | |
| changelog: | |
| description: 'Changelog text (mutually exclusive with pr_body)' | |
| required: false | |
| type: string | |
| pr_body: | |
| description: 'Full PR body — changelog will be extracted (mutually exclusive with changelog)' | |
| required: false | |
| type: string | |
| environment: | |
| description: 'Environment (development/production)' | |
| required: true | |
| default: 'development' | |
| type: string | |
| dry_run: | |
| description: 'Dry run (skip submission and tagging)' | |
| required: false | |
| default: false | |
| type: boolean | |
| secrets: | |
| SESSION_TOKEN: | |
| description: 'Framer session cookie' | |
| required: true | |
| FRAMER_ADMIN_SECRET: | |
| description: 'Framer admin API key' | |
| required: true | |
| SLACK_WEBHOOK_URL: | |
| description: 'Slack webhook URL for notifications' | |
| required: false | |
| RETOOL_URL: | |
| description: 'Retool dashboard URL for Slack notifications' | |
| required: false | |
| SLACK_ERROR_WEBHOOK_URL: | |
| description: 'Slack webhook URL for error notifications' | |
| required: false | |
| PLUGIN_BUILD_SECRETS: | |
| description: 'Newline-separated KEY=VALUE pairs to set as env vars during build' | |
| required: false | |
| jobs: | |
| submit: | |
| name: Submit Plugin to Marketplace | |
| runs-on: ubuntu-latest | |
| environment: ${{ inputs.environment }} | |
| steps: | |
| # Checkout the caller's repo (plugin source + git history for tags) | |
| - name: Checkout plugin source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| path: source | |
| # Checkout the plugins repo (scripts + tooling). | |
| # For workflow_dispatch this is redundant (same repo), but keeps the flow uniform. | |
| - name: Checkout tooling | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: niekert/plugins | |
| path: tooling | |
| - name: Configure git identity | |
| working-directory: source | |
| run: | | |
| git config user.email "marketplace@framer.team" | |
| git config user.name "Framer Marketplace" | |
| - name: Validate plugin path | |
| working-directory: source | |
| run: | | |
| if [ ! -d "${{ inputs.plugin_path }}" ]; then | |
| echo "Error: Plugin path '${{ inputs.plugin_path }}' does not exist" | |
| echo "" | |
| echo "Available contents:" | |
| ls -1 | |
| exit 1 | |
| fi | |
| if [ ! -f "${{ inputs.plugin_path }}/framer.json" ]; then | |
| echo "Error: No framer.json found in '${{ inputs.plugin_path }}'" | |
| exit 1 | |
| fi | |
| echo "Plugin path validated: ${{ inputs.plugin_path }}" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: tooling/.tool-versions | |
| - name: Install tooling dependencies | |
| working-directory: tooling | |
| run: yarn install | |
| - name: Install source plugin dependencies | |
| working-directory: source | |
| run: yarn install | |
| - name: Build framer-plugin-tools | |
| working-directory: tooling | |
| run: yarn turbo run build --filter=framer-plugin-tools | |
| - name: Set plugin build environment | |
| run: echo "${{ secrets.PLUGIN_BUILD_SECRETS }}" >> "$GITHUB_ENV" | |
| - name: Submit plugin | |
| working-directory: tooling | |
| run: yarn tsx scripts/submit-plugin.ts | |
| env: | |
| PLUGIN_PATH: ${{ github.workspace }}/source/${{ inputs.plugin_path }} | |
| REPO_ROOT: ${{ github.workspace }}/source | |
| CHANGELOG: ${{ inputs.changelog }} | |
| PR_BODY: ${{ inputs.pr_body }} | |
| SESSION_TOKEN: ${{ secrets.SESSION_TOKEN }} | |
| FRAMER_ADMIN_SECRET: ${{ secrets.FRAMER_ADMIN_SECRET }} | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| SLACK_ERROR_WEBHOOK_URL: ${{ secrets.SLACK_ERROR_WEBHOOK_URL }} | |
| RETOOL_URL: ${{ secrets.RETOOL_URL }} | |
| FRAMER_ENV: ${{ inputs.environment }} | |
| GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| DRY_RUN: ${{ inputs.dry_run }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |