diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..174c30f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release workflow + +on: + push: + branches: + - main + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: 1 + - run: bun install + - run: bun build + - run: bun run semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..30a899e --- /dev/null +++ b/.releaserc @@ -0,0 +1,5 @@ +{ + "branches": [ + "main" + ] +} \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 37cb165..60282db 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 746b07f..1d74cbb 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "semantic-release": "semantic-release" }, "dependencies": { "@auth/mongodb-adapter": "^2.0.1", @@ -25,6 +26,7 @@ "eslint-config-prettier": "^9.0.0", "husky": "^8.0.3", "lint-staged": "^14.0.1", - "prettier": "^3.0.3" + "prettier": "^3.0.3", + "semantic-release": "^22.0.5" } }