diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ff87ec0..1b2974c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: push: branches: [ main ] +env: + HUSKY: 0 + CI: true + jobs: release: if: ${{ github.event.repository.full_name == github.repository }} && {{ !contains(github.event.head_commit.message, "skip ci") }} @@ -20,11 +24,9 @@ jobs: - uses: oven-sh/setup-bun@v1 - name: "Install dependencies" - run: bun install --production --frozen-lockfile + run: bun install --frozen-lockfile - name: "Release" run: bunx semantic-release env: - HUSKY: 0 - CI: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.husky/install.mjs b/.husky/install.mjs new file mode 100644 index 00000000..5a33bee7 --- /dev/null +++ b/.husky/install.mjs @@ -0,0 +1,6 @@ +// Skip Husky install in production and CI +if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { + process.exit(0); +} +const husky = (await import('husky')).default; +console.log(husky()); diff --git a/bun.lockb b/bun.lockb index 16819109..4d0d6558 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 1b24ca19..d1663d54 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lint:eslint": "eslint .", "lint:prettier": "prettier --check .", "fix:prettier": "prettier --write .", - "prepare": "husky", + "prepare": "node .husky/install.mjs", "postinstall": "nuxt prepare", "ci:check": "bun run lint:eslint && bun run lint:prettier && bun run lint:spelling && bun run lint:markdown", "release": "semantic-release" @@ -25,6 +25,7 @@ "@nuxt/ui": "^2.16.0", "@nuxt/ui-pro": "^1.1.0", "@nuxtjs/seo": "^2.0.0-rc.10", + "nuxt-headlessui": "^1.2.0", "dayjs": "^1.11.10", "nuxt": "^3.11.2", "nuxt-og-image": "^3.0.0-rc.53", @@ -35,6 +36,11 @@ "devDependencies": { "@commitlint/cli": "^19.3.0", "@commitlint/config-conventional": "^19.2.2", + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^12.0.0", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^10.0.5", + "@semantic-release/release-notes-generator": "^13.0.0", "@vue/test-utils": "^2.4.5", "cspell": "^8.7.0", "eslint": "^8.57.0", @@ -42,9 +48,9 @@ "lint-staged": "^15.2.4", "markdownlint": "^0.34.0", "markdownlint-cli2": "^0.13.0", - "nuxt-headlessui": "^1.2.0", "prettier": "^3.2.5", "prettier-eslint": "^16.3.0", - "prettier-plugin-tailwindcss": "^0.5.14" + "prettier-plugin-tailwindcss": "^0.5.14", + "semantic-release": "^23.1.1" } }