From a05e67d5e1ceeab2d4f0671ef68023b4517ba11f Mon Sep 17 00:00:00 2001 From: Bereket Engida Date: Fri, 25 Jul 2025 21:04:17 -0700 Subject: [PATCH] chore: update release workflow --- .github/workflows/release.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a100f2f2..7dbf9da0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,24 +2,38 @@ name: Release on: push: - branches: - - main + tags: + - 'v*' + +permissions: + contents: write jobs: release: - if: ${{ github.repository_owner == 'better-auth' }} - name: Create a PR for release workflow runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: ./.github/actions/setup - - name: Check for errors - run: pnpm check + - uses: actions/setup-node@v4 + with: + node-version: 20.x - - name: Build the package + - 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: Create Version PR or Publish to NPM