Skip to content

Commit f136248

Browse files
committed
chore: bump all packages to 2.0.0 and add npm publish workflow
- Bump core and react to 2.0.0 to match the JS SDK - Add publishConfig with access: public and provenance: true - Add repository, homepage, bugs, keywords to all packages - Add files field to JS package to limit published contents - Add publish.yml workflow using OIDC trusted publishing
1 parent 97c1577 commit f136248

4 files changed

Lines changed: 102 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
11+
jobs:
12+
publish:
13+
name: Publish
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: 24
23+
registry-url: https://registry.npmjs.org
24+
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: Build
29+
run: pnpm build
30+
31+
- name: Test
32+
run: pnpm vp test run
33+
34+
- name: Publish packages
35+
run: pnpm -r publish --access public --no-git-checks
36+
env:
37+
NPM_CONFIG_PROVENANCE: true

packages/core/package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
{
22
"name": "@tago-io/custom-widget-core",
3-
"version": "0.1.0",
3+
"version": "2.0.0",
44
"description": "Framework-agnostic core for TagoIO Custom Widget SDKs",
5+
"keywords": [
6+
"custom-widget",
7+
"dashboard",
8+
"iot",
9+
"tago",
10+
"tagoio",
11+
"widget"
12+
],
13+
"homepage": "https://github.com/tago-io/custom-widget#readme",
14+
"bugs": "https://github.com/tago-io/custom-widget/issues",
515
"license": "Apache-2.0",
616
"author": "Tago LLC",
7-
"repository": "tago-io/custom-widget",
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/tago-io/custom-widget.git",
20+
"directory": "packages/core"
21+
},
822
"files": [
923
"dist"
1024
],
@@ -25,6 +39,10 @@
2539
}
2640
}
2741
},
42+
"publishConfig": {
43+
"access": "public",
44+
"provenance": true
45+
},
2846
"scripts": {
2947
"build": "tsup",
3048
"test": "vp test run",

packages/js/package.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,33 @@
22
"name": "@tago-io/custom-widget",
33
"version": "2.0.0",
44
"description": "TagoIO Toolkit to build your own widgets",
5+
"keywords": [
6+
"custom-widget",
7+
"dashboard",
8+
"iot",
9+
"javascript",
10+
"tago",
11+
"tagoio",
12+
"widget"
13+
],
14+
"homepage": "https://github.com/tago-io/custom-widget#readme",
15+
"bugs": "https://github.com/tago-io/custom-widget/issues",
516
"license": "Apache-2.0",
617
"author": "Tago LLC",
7-
"repository": "tago-io/custom-widget",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/tago-io/custom-widget.git",
21+
"directory": "packages/js"
22+
},
23+
"files": [
24+
"dist"
25+
],
826
"type": "module",
927
"main": "./dist/custom-widget.js",
28+
"publishConfig": {
29+
"access": "public",
30+
"provenance": true
31+
},
1032
"scripts": {
1133
"build:scripts": "tsup",
1234
"build:css": "lessc ./src/css/custom-widget.less ./dist/custom-widget.css",

packages/react/package.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
{
22
"name": "@tago-io/custom-widget-react",
3-
"version": "0.1.0",
3+
"version": "2.0.0",
44
"description": "React SDK for TagoIO Custom Widgets",
5+
"keywords": [
6+
"custom-widget",
7+
"dashboard",
8+
"hooks",
9+
"iot",
10+
"react",
11+
"tago",
12+
"tagoio",
13+
"widget"
14+
],
15+
"homepage": "https://github.com/tago-io/custom-widget#readme",
16+
"bugs": "https://github.com/tago-io/custom-widget/issues",
517
"license": "Apache-2.0",
618
"author": "Tago LLC",
7-
"repository": "tago-io/custom-widget",
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/tago-io/custom-widget.git",
22+
"directory": "packages/react"
23+
},
824
"files": [
925
"dist"
1026
],
@@ -25,6 +41,10 @@
2541
}
2642
}
2743
},
44+
"publishConfig": {
45+
"access": "public",
46+
"provenance": true
47+
},
2848
"scripts": {
2949
"build": "tsup",
3050
"test": "vp test run",

0 commit comments

Comments
 (0)