-
Notifications
You must be signed in to change notification settings - Fork 47
Prepare CI scripts for reusability in Workshop repo #558
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1f74744
Make submit-plugin.yml reusable from other repos
niekert 04c9089
Extract check-pr.yml as reusable workflow
niekert bed0836
Fix check-pr.yml: use yarn install + working-directory instead of yar…
niekert a27d3a8
Point check-pr.yml at niekert/plugins fork for testing
niekert c99601e
Simplify check-pr.yml: use npx tsx, no yarn install needed
niekert 35a6de2
Pin tsx version in check-pr.yml to avoid supply chain risk
niekert 1ad3d5b
Point check-pr.yml checkout at default branch instead of feature branch
niekert 6ed4df8
install source dependencies
niekert ac12ba2
add ability to pass build secrets
niekert dcada36
Use node with strip-types flag
niekert a8d16cf
Improve Check PR workflow name
niekert 5bc32db
Update to correct label name
niekert c5ac8a7
Skip PR check when title contains [skip ci]
niekert 8c70966
fixup! Use node with strip-types flag
niekert ad9621b
niekert/plugins -> framer/plugins
niekert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Check Plugin is ready to submit | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| has_changelog: | ||
| description: 'Whether the PR body contains a changelog section' | ||
| value: ${{ jobs.check.outputs.has_changelog }} | ||
| changelog: | ||
| description: 'Extracted changelog text from the PR body' | ||
| value: ${{ jobs.check.outputs.changelog }} | ||
|
|
||
| jobs: | ||
| check: | ||
| name: PR Description Check | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' && !contains(github.event.pull_request.title, '[skip ci]') | ||
| outputs: | ||
| has_changelog: ${{ steps.validate.outputs.has_changelog }} | ||
| changelog: ${{ steps.validate.outputs.changelog }} | ||
|
|
||
| steps: | ||
| - name: Check if Auto Submit label is present | ||
| id: check-label | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const labels = context.payload.pull_request.labels || [] | ||
| const hasSubmitLabel = labels.some(label => label.name === 'Auto submit to Marketplace on merge') | ||
| core.setOutput('require_changelog', hasSubmitLabel ? 'true' : 'false') | ||
| - name: Checkout tooling | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: framer/plugins | ||
| path: tooling | ||
| sparse-checkout: scripts | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Validate PR body | ||
| id: validate | ||
| working-directory: tooling | ||
| run: node --experimental-strip-types scripts/validate-pr-body.ts | ||
| env: | ||
| PR_BODY: ${{ github.event.pull_request.body }} | ||
| REQUIRE_CHANGELOG: ${{ steps.check-label.outputs.require_changelog }} | ||
|
|
||
| - name: Add Auto Submit on merge label | ||
| if: >- | ||
| steps.validate.outputs.has_changelog == 'true' && | ||
| (github.event.action == 'opened' || github.event.action == 'ready_for_review') | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| labels: ['Auto submit to Marketplace on merge'] | ||
| }) | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.