Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release to NPM

on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag for manual run'
required: false
default: 'manual'

jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Configure Yarn for npm publishing
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
corepack enable
yarn config set npmRegistryServer "https://registry.npmjs.org"
yarn config set npmAlwaysAuth true
yarn config set npmAuthToken "$NODE_AUTH_TOKEN"

- name: Install dependencies
run: yarn install --immutable

- name: Type check
run: yarn run check:all

- name: Build libraries
run: yarn run build:libs

- name: Run unit tests
run: yarn test

- name: Publish packages to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn workspaces foreach -v -W --no-private npm publish --tolerate-republish --tag latest --access public

- name: Summary
env:
RELEASE_TAG: ${{ github.event.release.tag_name || github.event.inputs.release_tag || 'unknown' }}
run: echo "Packages successfully published to npm for release $RELEASE_TAG"
36 changes: 36 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"git": {
"commitMessage": "chore: release v${version}",
"tagName": "v${version}",
"requireCleanWorkingDir": true,
"requireBranch": "main"
},
"github": {
"release": true,
"releaseName": "v${version}",
"autoGenerate": false
},
"npm": {
"publish": false
},
"hooks": {},
"plugins": {
"@release-it/bumper": {
"out": [
"packages/*/package.json",
"infra/*/package.json",
"vendor/*/package.json",
"backend/*/package.json",
"demos/*/package.json",
"examples/*/*/package.json"
]
},
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits"
},
"infile": "CHANGELOG.md",
"header": "# Changelog"
}
}
}
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ packageExtensions:
peerDependenciesMeta:
"@types/keshi":
optional: true
"@conventional-changelog/git-client@*":
dependencies:
conventional-commits-filter: "*"
conventional-commits-parser: "*"

plugins: null

Expand Down
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,35 @@
"build": "yarn workspaces foreach -v -W --jobs 5 run build",
"build:libs": "yarn workspaces foreach -v -p -W --no-private --jobs 5 run build",
"clean": "yarn workspaces foreach -v -p -W run clean",
"bump:prerelease": "yarn workspaces foreach -v --all version prerelease",
"bump:patch": "yarn workspaces foreach -v --all version patch",
"bump:minor": "yarn workspaces foreach -v --all version minor",
"bump:major": "yarn workspaces foreach -v --all version major",
"publish:next": "yarn workspaces foreach -v -W --no-private npm publish --tolerate-republish --tag next --access public",
"publish:latest": "yarn workspaces foreach -v -W --no-private npm publish --tolerate-republish --tag latest --access public",
"release": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it",
"release:patch": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it patch",
"release:minor": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it minor",
"release:major": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it major",
"release:dry": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it --dry-run",
"check:all": "yarn workspaces foreach -v -p -A -j 5 run check",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:headed": "playwright test --headed"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@release-it/bumper": "^7.0.5",
"@release-it/conventional-changelog": "^10.0.6",
"@ribajs/eslint-config": "workspace:^",
"@ribajs/tsconfig": "workspace:^",
"@ribajs/types": "workspace:^",
"@typescript-eslint/eslint-plugin": "^8.58.1",
"@typescript-eslint/parser": "^8.58.1",
"@yarnpkg/pnpify": "^4.1.6",
"conventional-changelog-conventionalcommits": "^9.3.1",
"eslint": "^10.2.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-prettier": "^5.5.5",
"jsdom": "^29.0.2",
"prettier": "^3.8.2",
"release-it": "^19.2.4",
"sass": "^1.99.0",
"typescript": "^6.0.2",
"vite": "^8.0.8",
Expand Down
Loading
Loading