Skip to content

Commit 6dff857

Browse files
authored
Add changesets and release pipeline (#19)
1 parent a9ae103 commit 6dff857

File tree

8 files changed

+562
-528
lines changed

8 files changed

+562
-528
lines changed

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [["@knime/kds*"]],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/shaggy-things-start.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@knime/kds-components": patch
3+
"@knime/kds-styles": patch
4+
---
5+
6+
Improved tokens

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
steps:
17+
- name: Checkout Repo
18+
uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
- name: Install Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version-file: "package.json"
24+
cache: "pnpm"
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
publish: pnpm run publish
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ Here are some of the most important scripts defined in the top-level [`package.j
6969
- in VS Code, add the [Figma MCP server](https://github.com/mcp/figma/mcp-server-guide) - use the cloud-based server to not require the Figma desktop app
7070
- then select a component or a design in Figma, copy the URL including the node id and prompt into Agent mode, e.g.: `implement component: {{FigmaUrl}}`
7171

72+
## Maintaining changelogs & publishing to npm
73+
74+
Every PR with changes that should be published must include changeset file(s) out of which the CHANGELOG file of each package will get generated. Use the following command to create such files:
75+
76+
```sh
77+
pnpm run changeset
78+
```
79+
80+
Merge those files with the PR to master.
81+
82+
### Publishing to npm
83+
84+
The [`release` GitHub Action](./.github/workflows/release.yml) will automatically create & update a "Version Packages" PR if it detects
85+
changeset file(s) on master. Once a release should be published to npm, simply do merge this PR.
86+
7287
# Join the Community!
7388

7489
- [KNIME Forum](https://forum.knime.com/)

bitbucket-pipelines.yml

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

documentation/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"components"
1313
],
1414
"type": "module",
15+
"private": true,
1516
"scripts": {
1617
"_preBuild": "pnpm run --filter @knime/kds-styles build",
1718
"build-storybook": "pnpm _preBuild && storybook build",

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"name": "@knime/kds-root",
3-
"version": "0.0.8",
42
"description": "Root package for managing the monorepo for the KNIME Design System",
53
"license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
64
"author": "KNIME AG, Zurich, Switzerland",
@@ -21,13 +19,17 @@
2119
"dev": "pnpm run --filter @knime/kds-documentation storybook",
2220
"test:unit": "vitest",
2321
"coverage": "vitest run --coverage",
22+
"changeset": "pnpm exec changeset",
23+
"changeset:version": "pnpm exec changeset version",
24+
"changeset:publish": "pnpm exec changeset publish",
25+
"publish": "pnpm build && pnpm changeset:publish",
2426
"audit": "pnpm audit --prod",
25-
"publish": "pnpm -r --filter '@knime/kds-styles' --filter '@knime/kds-components' publish --no-git-checks",
2627
"prepare": "husky",
2728
"license-check": "license-check -c",
2829
"postinstall": "run-p license-check build:styles"
2930
},
3031
"devDependencies": {
32+
"@changesets/cli": "2.29.7",
3133
"@knime/eslint-config": "9.3.0",
3234
"@knime/licenses": "1.3.2",
3335
"@tsconfig/node24": "catalog:",

0 commit comments

Comments
 (0)