Skip to content

Commit

Permalink
fix(docs): clarify the default for tag_name (#544)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexeagle authored Dec 1, 2024
1 parent 62368ac commit 39a5683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The following are optional as `step.with` keys
| `preserve_order` | Boolean | Indicator of whether order of files should be preserved when uploading assets |
| `files` | String | Newline-delimited globs of paths to assets to upload for release |
| `name` | String | Name of the release. defaults to tag name |
| `tag_name` | String | Name of a tag. defaults to `github.ref` |
| `tag_name` | String | Name of a tag. defaults to `github.ref_name` |
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing |
| `repository` | String | Name of a target repository in `<owner>/<repo>` format. Defaults to GITHUB_REPOSITORY env variable |
| `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. |
Expand Down

0 comments on commit 39a5683

Please sign in to comment.