-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: migrate n8n node to official n8n-node CLI tooling #7
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
base: main
Are you sure you want to change the base?
Changes from all commits
e37011a
9073a50
c702e71
150c326
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: n8n Node CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'n8n/**' | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'n8n/**' | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: n8n | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - run: npm install | ||
|
|
||
| - run: npm run lint | ||
|
|
||
| - run: npm run build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Publish n8n Node to npm | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When manually dispatched from a branch (e.g., This is subtle enough to confuse operators expecting a manual publish to "just work" from the default branch. Consider either documenting this constraint or restructuring the guard: 🔧 Option: make workflow_dispatch always publish (bypass guard)- if: startsWith(github.ref, 'refs/tags/n8n-')
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/n8n-')Also applies to: 11-11 🤖 Prompt for AI Agents |
||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if: startsWith(github.ref, 'refs/tags/n8n-') | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| defaults: | ||
| run: | ||
| working-directory: n8n | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - run: npm install | ||
pranavjana marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - run: npm run lint | ||
|
|
||
| - run: npm run build | ||
|
|
||
| - run: npm publish --provenance --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| module.exports = { | ||
| semi: true, | ||
| trailingComma: 'all', | ||
| bracketSpacing: true, | ||
| useTabs: true, | ||
| tabWidth: 2, | ||
| arrowParens: 'always', | ||
| singleQuote: true, | ||
| quoteProps: 'as-needed', | ||
| endOfLine: 'lf', | ||
| printWidth: 100, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import { config } from '@n8n/node-cli/eslint'; | ||
|
|
||
| export default config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI won't self-trigger on workflow file changes.
The
n8n/**path filter excludes.github/workflows/n8n-ci.ymlitself. A PR that only edits this workflow file won't run the CI job, so workflow changes can't be validated automatically.Consider adding the workflow path to the trigger:
🔧 Proposed fix
on: pull_request: paths: - 'n8n/**' + - '.github/workflows/n8n-ci.yml' push: branches: [main] paths: - 'n8n/**' + - '.github/workflows/n8n-ci.yml'📝 Committable suggestion
🤖 Prompt for AI Agents