Skip to content

Commit d792f52

Browse files
committed
chore(ci): gh cli
1 parent 43b734b commit d792f52

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,25 @@ jobs:
105105
- name: Set git remote to use App token
106106
run: git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/supabase/supabase-js.git
107107

108-
- name: Test App token git push
108+
- name: Authenticate gh CLI with App token
109109
env:
110-
RELEASE_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
110+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
111+
run: |
112+
gh auth login --with-token
113+
114+
- name: Create and push branch with gh CLI
111115
run: |
112116
git checkout --orphan test-token-push
113117
git commit --allow-empty -m "chore(repo): test push"
114-
# Unset credential helper so git does NOT use GITHUB_TOKEN
115-
git config --global --unset credential.helper || true
116-
git config --unset credential.helper || true
117-
# Set remote to use the GitHub App token
118-
git remote set-url origin https://x-access-token:${RELEASE_GITHUB_TOKEN}@github.com/supabase/supabase-js.git
119-
# Optionally: show remote for debug (token will be masked in logs)
120-
git remote -v
121118
git push origin test-token-push
119+
120+
- name: Create pull request with gh CLI
121+
run: |
122+
gh pr create \
123+
--base master \
124+
--head test-token-push \
125+
--title "chore(repo): test push" \
126+
--body "Automated PR for test-token-push"
122127
123128
- name: Release
124129
env:

0 commit comments

Comments
 (0)