mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
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:
+8
-7
@@ -5,7 +5,9 @@ runs:
|
||||
main: "dist/index.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 }}
|
||||
publish-script:
|
||||
@@ -38,14 +40,13 @@ inputs:
|
||||
this option will also always be `true`.
|
||||
required: false
|
||||
default: true
|
||||
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 and tags.
|
||||
Defaults to `false`. When using the GitHub API, commits and tags 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:
|
||||
published:
|
||||
description: A "true" or "false" string value to indicate whether a publishing is happened or not
|
||||
|
||||
Reference in New Issue
Block a user