@@ -39,29 +39,37 @@ jobs:
3939 # Ensure npm 11.5.1 or later is installed for trusted publishing support
4040 - name : Update npm
4141 run : npm install -g npm@latest
42+
4243 - name : Install dependencies
4344 run : npm ci --legacy-peer-deps
45+
4446 - name : Configure git
4547 run : |
4648 git config --global user.name "supabase-releaser[bot]"
4749 git config --global user.email "supabase-releaser[bot]@users.noreply.github.com"
4850
51+ # Remove ALL git credential helpers to ensure our App token is used
52+ - name : Remove Actions credential helper
53+ run : |
54+ git config --system --unset credential.helper || true
55+ git config --global --unset credential.helper || true
56+ git config --local --unset credential.helper || true
57+
4958 - name : Set git remote to use App token
5059 run : git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/supabase/supabase-js.git
5160
52- - name : Authenticate gh CLI with App token
61+ # No need to run gh auth login --with-token if GH_TOKEN is set
62+ - name : Create and push branch with gh CLI
5363 env :
5464 GH_TOKEN : ${{ steps.app-token.outputs.token }}
55- run : |
56- gh auth login --with-token
57-
58- - name : Create and push branch with gh CLI
5965 run : |
6066 git checkout --orphan test-token-push
6167 git commit --allow-empty -m "chore(repo): test push"
6268 git push origin test-token-push
6369
6470 - name : Create pull request with gh CLI
71+ env :
72+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
6573 run : |
6674 gh pr create \
6775 --base master \
8189 name : Trigger Update JS Libs
8290 runs-on : ubuntu-latest
8391 needs : release-stable
84- if : ${{
85- github.event_name == 'workflow_dispatch' &&
86- needs.release-stable.result == 'success'
87- }}
92+ if : ${{ github.event_name == 'workflow_dispatch' && needs.release-stable.result == 'success' }}
8893 steps :
8994 - name : Generate token
9095 id : app-token
@@ -112,10 +117,7 @@ jobs:
112117 name : Trigger Supabase Docs Update
113118 runs-on : ubuntu-latest
114119 needs : [release-stable]
115- if : ${{
116- github.event_name == 'workflow_dispatch' &&
117- needs.release-stable.result == 'success'
118- }}
120+ if : ${{ github.event_name == 'workflow_dispatch' && needs.release-stable.result == 'success' }}
119121 steps :
120122 - name : Generate token
121123 id : app-token
0 commit comments