From 6e355d93d7786860f684409e39df88dd2aeeaf56 Mon Sep 17 00:00:00 2001 From: khoilen Date: Tue, 7 Jan 2025 10:10:53 +0700 Subject: [PATCH] feat: still bump version if it fail --- ...bump-version-publish-css.yml => bump-version.yml} | 1 + lint-staged.config.js | 2 +- package.json | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) rename .github/workflows/{bump-version-publish-css.yml => bump-version.yml} (96%) diff --git a/.github/workflows/bump-version-publish-css.yml b/.github/workflows/bump-version.yml similarity index 96% rename from .github/workflows/bump-version-publish-css.yml rename to .github/workflows/bump-version.yml index 4d20505..2313a51 100644 --- a/.github/workflows/bump-version-publish-css.yml +++ b/.github/workflows/bump-version.yml @@ -39,6 +39,7 @@ jobs: - name: bump version run: pnpm version ${{ github.event.inputs.version }} working-directory: apps/nt-stylesheet + continue-on-error: true - name: Push latest version run: git push origin main --follow-tags diff --git a/lint-staged.config.js b/lint-staged.config.js index 4298c45..6a7a4a4 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,5 +1,5 @@ module.exports = { - '{apps}/**/*.{js,ts,jsx,tsx,json,css,scss,md}': (files) => { + '**/*.{js,ts,jsx,tsx,json,css,scss,md}': (files) => { return [ `prettier --write ${files.join(' ')}`, `pnpm eslint . --fix`, diff --git a/package.json b/package.json index d64be58..a972903 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "packageManager": "pnpm@9.0.5", "engines": { - "node": "20" + "node": ">= 20" }, "keywords": [], "author": "Nashtech", @@ -35,7 +35,8 @@ "apps/*" ], "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "postinstall": "husky install" }, "repository": { "type": "git", @@ -44,5 +45,10 @@ "bugs": { "url": "https://github.com/nashtech-garage/nt-sketchbook/issues" }, - "homepage": "https://github.com/nashtech-garage/nt-sketchbook#readme" + "homepage": "https://github.com/nashtech-garage/nt-sketchbook#readme", + "husky": { + "hooks": { + "pre-commit": "npx lint-staged" + } + } }