Skip to content

Commit 39a5683

Browse files
authored
fix(docs): clarify the default for tag_name (#544)
The logic here: https://github.com/softprops/action-gh-release/blob/01570a1f39cb168c169c802c3bceb9e93fb10974/src/github.ts#L217 transforms `github.ref` in such a way that it matches `github.ref_name` instead. Per [docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context): > github.ref_name string The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1. Note, I could imagine a PR that changes the TypeScript code to use that variable instead, but I'm trying to be conservative here. Perhaps some users are on-prem GitHub Enterprise and that variable doesn't exist.
1 parent 62368ac commit 39a5683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ The following are optional as `step.with` keys
186186
| `preserve_order` | Boolean | Indicator of whether order of files should be preserved when uploading assets |
187187
| `files` | String | Newline-delimited globs of paths to assets to upload for release |
188188
| `name` | String | Name of the release. defaults to tag name |
189-
| `tag_name` | String | Name of a tag. defaults to `github.ref` |
189+
| `tag_name` | String | Name of a tag. defaults to `github.ref_name` |
190190
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing |
191191
| `repository` | String | Name of a target repository in `<owner>/<repo>` format. Defaults to GITHUB_REPOSITORY env variable |
192192
| `target_commitish` | String | Commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Defaults to repository default branch. |

0 commit comments

Comments
 (0)