mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
feat: git workflows
This commit is contained in:
39
.github/workflows/ci.yml
vendored
Normal file
39
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: main
|
||||
push:
|
||||
branches: main
|
||||
merge_group: {}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: pnpm
|
||||
|
||||
- name: Install
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: lint
|
||||
run: pnpm lint
|
||||
|
||||
- name: test
|
||||
run: pnpm test
|
||||
|
||||
- name: typecheck
|
||||
run: pnpm typecheck
|
||||
50
.github/workflows/release.yml
vendored
Normal file
50
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: npx changelogithub
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Check version
|
||||
id: check_version
|
||||
run: |
|
||||
tag=$(echo ${GITHUB_REF#refs/tags/})
|
||||
if [[ $tag == *"beta"* ]]; then
|
||||
echo "::set-output name=tag::beta"
|
||||
elif [[ $tag == *"alpha"* ]]; then
|
||||
echo "::set-output name=tag::alpha"
|
||||
else
|
||||
echo "::set-output name=tag::latest"
|
||||
fi
|
||||
|
||||
- name: Publish to npm
|
||||
run: pnpm -r publish --access public --no-git-checks --tag ${{steps.check_version.outputs.tag}}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
@@ -368,7 +368,6 @@ export const contents: Content[] = [
|
||||
icon: MailCheck,
|
||||
href: "/docs/plugins/email-verifier",
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -8,6 +8,7 @@
|
||||
"build": "turbo --filter \"./packages/*\" build",
|
||||
"dev": "turbo --filter \"./packages/*\" dev",
|
||||
"clean": "turbo --filter \"./packages/*\" clean && rm -rf node_modules",
|
||||
"bump": "bumpp -r",
|
||||
"format": "biome format . --write",
|
||||
"lint": "biome check .",
|
||||
"lint:fix": "biome check . --apply",
|
||||
|
||||
Reference in New Issue
Block a user