Skip to content

Commit

Permalink
build: setup changesets
Browse files Browse the repository at this point in the history
Set `@example/design-tokens` to private to prevent publishing from the
example repo
  • Loading branch information
matijs authored and Robbert committed Aug 14, 2024
1 parent 74fe275 commit 8da9d96
Show file tree
Hide file tree
Showing 6 changed files with 513 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changeset sjabloon

Kopieer en plak het onderstaande sjabloon. Je kunt hiervoor de kopieer knop linksboven in het template gebruiken.

```markdown
---
'@example/<package-name>': major
---

Beschrijving

Beschrijf na de tweede set `---` welke veranderingen je hebt doorgevoerd.

Geef bij breaking changes aan **wat** er veranderd is, **waarom** de verandering nodig was en **hoe** gebruikers van het
package hun code moeten aanpassen.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
18 changes: 7 additions & 11 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,17 @@ jobs:
- name: "Continuous Deployment: build"
run: pnpm run --if-present build

- name: "Continuous Deployment: publish to GitHub repository"
- name: "Continuous Deployment: publish to the NPM repository"
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: "NL Design System"
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: "NL Design System"
run: |
git push --set-upstream origin HEAD
pnpm run release
- name: "Continuous Deployment: publish to npm"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
pnpm run publish
pnpm config delete "//registry.npmjs.org/:_authToken"
with:
commit: "docs(release): design system packages"
setupGitUser: false
title: "docs(release): design system packages"
publish: "pnpm run publish:changeset"
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"./proprietary/*"
],
"devDependencies": {
"@changesets/cli": "2.27.7",
"@lerna-lite/cli": "3.8.0",
"@lerna-lite/publish": "3.8.0",
"@lerna-lite/run": "3.8.0",
Expand Down Expand Up @@ -66,6 +67,7 @@
"prepare": "husky",
"prettier": "prettier --write .",
"publish": "lerna publish from-package --yes",
"publish:changeset": "changeset publish",
"release": "lerna version prerelease --conventional-prerelease --no-changelog --no-private --yes",
"start": "node_modules/http-server/bin packages/storybook/dist/",
"storybook": "npm-run-all --parallel watch:**",
Expand Down
Loading

0 comments on commit 8da9d96

Please sign in to comment.