diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1b6eb1b7c..6a106bc90d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,54 +15,38 @@ on: type: choice description: Package name (npm) options: + - "next-auth" - "@auth/core" + - "@auth/express" + - "@auth/nuxt" + - "@auth/qwik" + - "@auth/solid-start" + - "@auth/sveltekit" + - "@auth/azure-tables-adapter" + - "@auth/d1-adapter" - "@auth/dgraph-adapter" - "@auth/drizzle-adapter" - "@auth/dynamodb-adapter" + - "@auth/edgedb-adapter" - "@auth/fauna-adapter" - "@auth/firebase-adapter" - "@auth/hasura-adapter" + - "@auth/kysely-adapter" - "@auth/mikro-orm-adapter" - "@auth/mongodb-adapter" - "@auth/neo4j-adapter" + - "@auth/pg-adapter" - "@auth/pouchdb-adapter" - "@auth/prisma-adapter" - "@auth/sequelize-adapter" - "@auth/supabase-adapter" - "@auth/surrealdb-adapter" + - "@auth/test-adapter" - "@auth/typeorm-adapter" + - "@auth/typeorm-legacy-adapter" - "@auth/unstorage-adapter" - "@auth/upstash-redis-adapter" - "@auth/xata-adapter" - - "next-auth" - # TODO: Infer from package name - path: - type: choice - description: Directory name (packages/*) - options: - - "core" - - "frameworks-nextjs" - - "adapter-edgedb" - - "adapter-dgraph" - - "adapter-drizzle" - - "adapter-dynamodb" - - "adapter-fauna" - - "adapter-firebase" - - "adapter-hasura" - - "adapter-mikro-orm" - - "adapter-mongodb" - - "adapter-neo4j" - - "adapter-pouchdb" - - "adapter-prisma" - - "adapter-sequelize" - - "adapter-supabase" - - "adapter-surrealdb" - - "adapter-typeorm" - - "adapter-unstorage" - - "adapter-upstash-redis" - - "adapter-xata" - - "next-auth" - permissions: id-token: write @@ -234,11 +218,29 @@ jobs: cache: "pnpm" - name: Install dependencies run: pnpm install + - name: Map package name to path + run: | + case "${{ github.event.inputs.name }}" in + *"-adapter") + adapter_name=$(echo "${{ github.event.inputs.name }}" | sed 's/@auth\///' | sed 's/-adapter//') + echo "PACKAGE_PATH=adapter-${adapter_name}" >> $GITHUB_ENV + ;; + "next-auth") + echo "PACKAGE_PATH=next-auth" >> $GITHUB_ENV + ;; + "@auth/core") + echo "PACKAGE_PATH=core" >> $GITHUB_ENV + ;; + *) + framework_name=$(echo "${{ github.event.inputs.name }}" | sed 's/@auth\///') + echo "PACKAGE_PATH=frameworks-${framework_name}" >> $GITHUB_ENV + ;; + esac - name: Determine version uses: ./.github/version-pr id: determine-version env: - PACKAGE_PATH: ${{ github.event.inputs.path }} + PACKAGE_PATH: ${{ env.PACKAGE_PATH }} - name: Publish to npm run: | pnpm build @@ -249,5 +251,5 @@ jobs: echo "Install via: pnpm add ${{ github.event.inputs.name }}@${{ env.VERSION }}" env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - PACKAGE_PATH: ${{ github.event.inputs.path }} + PACKAGE_PATH: ${{ env.PACKAGE_PATH }} VERSION: ${{ steps.determine-version.outputs.version }}