@@ -39,29 +39,37 @@ jobs:
39
39
# Ensure npm 11.5.1 or later is installed for trusted publishing support
40
40
- name : Update npm
41
41
run : npm install -g npm@latest
42
+
42
43
- name : Install dependencies
43
44
run : npm ci --legacy-peer-deps
45
+
44
46
- name : Configure git
45
47
run : |
46
48
git config --global user.name "supabase-releaser[bot]"
47
49
git config --global user.email "supabase-releaser[bot]@users.noreply.github.com"
48
50
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
+
49
58
- name : Set git remote to use App token
50
59
run : git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/supabase/supabase-js.git
51
60
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
53
63
env :
54
64
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
59
65
run : |
60
66
git checkout --orphan test-token-push
61
67
git commit --allow-empty -m "chore(repo): test push"
62
68
git push origin test-token-push
63
69
64
70
- name : Create pull request with gh CLI
71
+ env :
72
+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
65
73
run : |
66
74
gh pr create \
67
75
--base master \
81
89
name : Trigger Update JS Libs
82
90
runs-on : ubuntu-latest
83
91
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' }}
88
93
steps :
89
94
- name : Generate token
90
95
id : app-token
@@ -112,10 +117,7 @@ jobs:
112
117
name : Trigger Supabase Docs Update
113
118
runs-on : ubuntu-latest
114
119
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' }}
119
121
steps :
120
122
- name : Generate token
121
123
id : app-token
0 commit comments