Skip to content

Commit d198265

Browse files
committed
add: publish setup
1 parent 5323baf commit d198265

File tree

4 files changed

+31
-106
lines changed

4 files changed

+31
-106
lines changed

.github/workflows/publish.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,39 @@ name: Publish to npm
22

33
on:
44
release:
5-
types: [created]
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
610

711
jobs:
812
build-and-publish:
913
runs-on: ubuntu-latest
14+
1015
steps:
1116
- name: Checkout repository
1217
uses: actions/checkout@v4
13-
18+
1419
- name: Set up pnpm
1520
uses: pnpm/action-setup@v4
1621

1722
- name: Set up Node.js
1823
uses: actions/setup-node@v4
1924
with:
20-
node-version: '20.x'
21-
registry-url: 'https://registry.npmjs.org/'
22-
cache: 'pnpm'
25+
node-version: "20"
26+
registry-url: "https://registry.npmjs.org/"
27+
cache: "pnpm"
28+
29+
# Ensure npm supports Trusted Publishing (OIDC)
30+
- name: Upgrade npm
31+
run: npm i -g npm@^11.5.1
2332

2433
- name: Install dependencies
2534
run: pnpm install --frozen-lockfile
2635

2736
- name: Build package
2837
run: pnpm run build --if-present
2938

30-
- name: Publish to npm
31-
run: pnpm publish --no-git-checks
32-
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
- name: Publish to npm (Trusted Publishing)
40+
run: pnpm publish --no-git-checks --access public

README.md

Lines changed: 14 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,21 @@
1-
![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
1+
# n8n-nodes-imagekit
22

3-
# n8n-nodes-starter
3+
ImageKit node for n8n - Convert HTML to images with font support.
44

5-
This repo contains example nodes to help you get started building your own custom integrations for [n8n](https://n8n.io). It includes the node linter and other dependencies.
5+
## Installation
66

7-
To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
7+
Add through community nodes `@raisaroj/n8n-nodes-imagekit`
88

9-
## Prerequisites
9+
## Features
1010

11-
You need the following installed on your development machine:
11+
- **HTML to Image**: Convert HTML content to images
12+
- **Font Support**: Access and use custom fonts
13+
- **List Fonts**: Browse available fonts
1214

13-
* [git](https://git-scm.com/downloads)
14-
* Node.js and pnpm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
15-
* Install n8n with:
16-
```
17-
npm install n8n -g
18-
```
19-
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).
15+
## Usage
2016

21-
## Using this starter
22-
23-
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).
24-
25-
1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
26-
2. Clone your new repo:
27-
```
28-
git clone https://github.com/<your organization>/<your-repo-name>.git
29-
```
30-
3. Run `pnpm i` to install dependencies.
31-
4. Open the project in your editor.
32-
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
33-
6. Update the `package.json` to match your details.
34-
7. Change the repository name in the `.env` file:
35-
```
36-
REPO_NAME=your-custom-repo-name
37-
```
38-
8. Run `pnpm lint` to check for errors or `pnpm lintfix` to automatically fix errors when possible.
39-
9. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
40-
10. To deploy and test your nodes with Docker, run:
41-
```
42-
pnpm run deploy
43-
```
44-
This will compile TypeScript, build icons, and start the Docker containers defined in `docker-compose.yml`.
45-
11. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
46-
12. Update the LICENSE file to use your details.
47-
13. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.
48-
49-
## More information
50-
51-
Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.
52-
53-
## License
54-
55-
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
17+
1. Add the ImageKit node to your n8n workflow
18+
2. Configure your ImageKit API credentials
19+
3. Select an operation:
20+
- **Composite HTML Image**: Convert HTML to an image
21+
- **List Fonts**: Get available fonts

README_TEMPLATE.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "n8n-nodes-imagekit",
2+
"name": "@raisaroj/n8n-nodes-imagekit",
33
"version": "0.1.0",
44
"description": "ImageKit node for n8n",
55
"keywords": [

0 commit comments

Comments
 (0)