Skip to content

Commit

Permalink
Expose files as env variable; Closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
meeDamian committed Oct 6, 2019
1 parent 08b4d6a commit 457784b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ All inputs are available as a _normal_ Action input, but because Github Actions
| `body` | - | no | Place to put a longer description of the release, ex changelog, or info about contributors. Defaults to the commit message of the reference commit. [more]
| `draft` | - | no | Set to `true` to create a release, but not publish it. `false` by default. [more]
| `prerelease` | - | no | Marks this release as a pre-release. `false` by default. [more]
| `files` | - | no | A **space-separated** list of files to be uploaded. When left empty, no files are uploaded. [More on files below]
| `files` | `RELEASE_FILES` | no | A **space-separated** list of files to be uploaded. When left empty, no files are uploaded. [More on files below]
| `gzip` | - | no | Set whether to `gzip` uploaded assets, or not. Available options are: `true`, `false`, and `folders` which uploads files unchanged, but compresses directories/folders. Defaults to `true`. Note: it errors if set to `false`, and `files:` argument contains path to a directory.
| `allow_override` | - | no | Allow override of release, if one with the same tag already exists. Defaults to `false`

Expand Down
7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,13 @@ RELEASE_ID="$(jq '.id' < "/tmp/${METHOD}.json")"
#
## Handle, and prepare assets
#
# If no `files:` passed as input, but `RELEASE_FILES` env var is set, use it instead
if [ -z "${INPUT_FILES}" ] && [ -n "${RELEASE_FILES}" ]; then
INPUT_FILES="${RELEASE_FILES}"
fi

if [ -z "${INPUT_FILES}" ]; then
>&2 echo "All done."
>&2 echo "No assets to upload. All done."
exit 0
fi

Expand Down

0 comments on commit 457784b

Please sign in to comment.