Skip to content

Commit

Permalink
chore: configure release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed May 23, 2024
1 parent 1f06c51 commit 40ab190
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Expand All @@ -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 }}
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -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());
Binary file modified bun.lockb
Binary file not shown.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -35,16 +36,21 @@
"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",
"husky": "^9.0.11",
"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"
}
}

0 comments on commit 40ab190

Please sign in to comment.