ci: add semantic release
If I understand their (somewhat confusing) docs correctly, the version number should now be written into package.json
, at least in the release.
Tested with this PR: https://git.astron.nl/astron-sdc/design-system/-/jobs/646836
Local dry run succeeded without errors:
mehfluffy@mehfluffys-MacBook-Pro design-system-poc % npm run semantic-release --dry-run
> design-system-poc@0.0.0 semantic-release
> semantic-release
[5:09:53 PM] [semantic-release] › ℹ Running semantic-release version 22.0.8
[5:09:54 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[5:09:54 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
[5:09:54 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer" in shareable config "@semantic-release/gitlab-config"
[5:09:54 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
[5:09:54 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
[5:09:54 PM] [semantic-release] › ⚠ This run was not triggered in a known CI environment, running in dry-run mode.
[5:09:57 PM] [semantic-release] › ⚠ Run automated release from branch semantic-versioning-and-release on repository git@git.astron.nl:astron-sdc/design-system.git in dry-run mode
[5:09:58 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[5:09:58 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[5:09:58 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[5:09:58 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[5:09:58 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[5:09:58 PM] [semantic-release] › ℹ No git tag version found on branch semantic-versioning-and-release
[5:09:58 PM] [semantic-release] › ℹ No previous release found, retrieving all commits
[5:09:58 PM] [semantic-release] › ℹ Found 69 commits since last release
[5:09:58 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'implement-form-components' into 'main'
add form components
See merge request astron-sdc/design-system!7
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: text input clear button placement
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'SDC-1125' into 'main'
docs: add figma docs to storybook
Closes SDC-1125
See merge request astron-sdc/design-system!11
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: docs: add figma docs to storybook
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'add-code-snippets' into 'main'
add code snippets
See merge request astron-sdc/design-system!9
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'remove-unnecessary-files' into 'main'
delete unnecessary files
See merge request astron-sdc/design-system!10
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: delete unnecessary files
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add code snippets
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: alert compponent color variants
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add radio buttons
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: separate svg classes for BaseInput clear button
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add clearable text input
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: add new icons to Icon.tsx
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'main' into implement-form-components
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add dropdown input
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add date input with date picker
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: abstract input boilerplate code into util component
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'SDC-1123/fix-static-images' into 'main'
Fix static images
Closes SDC-1123
See merge request astron-sdc/design-system!6
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add text input component
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add toggle component
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'use-nextui-for-existing-components' into 'main'
Use Next UI for existing components
See merge request astron-sdc/design-system!5
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: docs: update icon section
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add checkbox component
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: deduplicate icon src
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: icon import static
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: bml image
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: use Next UI supplied components as far as suitable
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'update-storybook' into 'main'
chore: update storybook to 7.5.3
See merge request astron-sdc/design-system!4
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: install Next UI
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: update storybook to 7.5.3
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'make-icons-customizable' into 'main'
Make icons customizable
See merge request astron-sdc/design-system!3
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: docs: add extra info for running tests locally
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: icon class names
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: test storybook in ci
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: set up basic tests
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add story for icons
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'main' into make-icons-customizable
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: typography color classes
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: rename type Colors to Color
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: readme and cleanup
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: make icon color customizable
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: use correct service in deployment
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: fix extra slash in docker
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: install svgr and move Icon.tsx
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: update to storybook 7.5.2
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'fix-linter-precommit' into 'main'
Fix linter precommit
See merge request astron-sdc/design-system!1
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'feature/initial-ci' into 'fix-linter-precommit'
ci: initial ci/cd
See merge request astron-sdc/design-system!2
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: fix ci indentation
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: include git
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge branch 'fix-linter-precommit' into feature/initial-ci
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: configure githooks properly
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: remove needs in deployment
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: user correct image in docker-compose.yml
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: remove build from deploy
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: fix ci order for deployment
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: ci: initial ci/cd
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: style: add commitlint hook
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: style: lint all files except src/index.css
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: fix: linter and precommit
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: slider dark mode
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: docs: add readme and license
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: slider light mode
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: minor improvements on existing components
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add documentation from docusaurus
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: add components from figma
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: commit misc files
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: dark mode in storybook
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: chore: add linting
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: initial commit
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[5:09:58 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 69 commits complete: minor release
[5:09:58 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[5:09:58 PM] [semantic-release] › ℹ There is no previous release, the next release version is 1.0.0
[5:09:58 PM] [semantic-release] › ⚠ Skip step "prepare" of plugin "@semantic-release/changelog" in dry-run mode
[5:09:58 PM] [semantic-release] › ⚠ Skip step "prepare" of plugin "@semantic-release/git" in dry-run mode
[5:09:58 PM] [semantic-release] › ⚠ Skip v1.0.0 tag creation in dry-run mode
[5:09:58 PM] [semantic-release] › ✔ Published release 1.0.0 on default channel
[5:09:58 PM] [semantic-release] › ℹ Release note for version 1.0.0:
mehfluffy@mehfluffys-MacBook-Pro design-system-poc %
Edited by Alissa Cheng