Use GitHub API for pushes by default and require explicit github-token when using custom tokens (#692)

* Ensure `github-token` wins for `git-cli` pushes

* more shenanigans

* Default to GitHub API commit mode

* e2e auth tests

* push missing utils

* rename input

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* reuse helpers

* refactor

* refactor

* simplify

* add tests

* refactor

* improve comments

* shift helper

* add comments

* extract test helpers

* update docs and changesets

* update one thing
This commit is contained in:
Mateusz Burzyński
2026-08-03 11:02:31 +00:00
committed by GitHub
parent 50de20a107
commit cb3f0110d7
20 changed files with 766 additions and 129 deletions
+8 -7
View File
@@ -5,7 +5,9 @@ runs:
main: ../dist/version.js
inputs:
github-token:
description: "The GitHub token to use for authentication. Defaults to the GitHub-provided token."
description: >
The GitHub token to use for authentication. Defaults to the GitHub-provided token.
To use a custom token, pass it explicitly to this input.
required: false
default: ${{ github.token }}
script:
@@ -25,14 +27,13 @@ inputs:
pr-base-branch:
description: "Sets the base branch of the PR. Defaults to `github.ref_name`."
required: false
commit-mode:
push-with-git-cli:
description: >
An enum to specify the commit mode. Use "git-cli" to push changes using the Git CLI,
or "github-api" to push changes via the GitHub API. When using "github-api",
all commits and tags are signed using GitHub's GPG key and attributed to the user
or app who owns the GITHUB_TOKEN.
Whether to use the Git CLI instead of the GitHub API to push release commits.
Defaults to `false`. When using the GitHub API, commits are signed using GitHub's
GPG key and attributed to the user or app that owns the `github-token`.
required: false
default: "git-cli"
default: false
outputs:
pr-number:
description: The pull request number that was created or updated