Skip to content

Commit

Permalink
test: release
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed May 23, 2024
1 parent 1f06c51 commit 770ec54
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: release 🚀

on:
pull_request:
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 +25,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());
1 change: 1 addition & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"branches": "main",
"dryRun": true,
"debug": true,
"tagFormat": "${version}",
"addReleases": "top",
Expand Down
2 changes: 1 addition & 1 deletion 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 Down

0 comments on commit 770ec54

Please sign in to comment.