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
+7 -7
View File
@@ -18,13 +18,13 @@ This action publishes packages to npm.
<!-- api-start -->
| Inputs | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `github-token` | The GitHub token to use for authentication. Defaults to the GitHub-provided token. |
| `script` | The command to use to publish packages |
| `pack-dir-artifact-id` | Artifact id for packed publish output generated by the pack subaction |
| `create-github-releases` | Whether to create Github releases after publish |
| `push-git-tags` | Whether to create git tags after publish. If `create-github-releases` is set to `true`, this option will also always be `true`. |
| Inputs | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `github-token` | The GitHub token to use for authentication. Defaults to the GitHub-provided token. To use a custom token, pass it explicitly to this input. |
| `script` | The command to use to publish packages |
| `pack-dir-artifact-id` | Artifact id for packed publish output generated by the pack subaction |
| `create-github-releases` | Whether to create Github releases after publish |
| `push-git-tags` | Whether to create git tags after publish. If `create-github-releases` is set to `true`, this option will also always be `true`. |
| Outputs | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |