From 7d269bd7122a9532697e0e48d3d8a6495e7d7ae8 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 4 Apr 2022 00:54:54 -0700 Subject: [PATCH 1/2] Add defaults to commonly set fields to reduce setup --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index d86edeb..581834b 100644 --- a/action.yml +++ b/action.yml @@ -8,12 +8,14 @@ inputs: repo_token: description: 'GitHub token.' required: true + default: ${{ github.token }} file: description: 'Local file to upload.' required: true tag: description: 'Tag to use as a release.' required: true + default: ${{ github.ref }} asset_name: description: 'Name of the asset. When not provided will use the file name. Unused if file_glob is set to "true".' overwrite: From 8d45355ac28c523d3b0fef6ea236a84c2ec377e9 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 4 Apr 2022 00:56:40 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2657656..8b575cb 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ It runs on all operating systems types offered by GitHub. You must provide: -- `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}`. - `file`: A local file to be uploaded as the asset. -- `tag`: The tag to upload into. If you want the current event's tag or branch name, use `${{ github.ref }}` (the `refs/tags/` and `refs/heads/` prefixes will be automatically stripped). Optional Arguments +- `repo_token`: Defaults to `github.token`. +- `tag`: The tag to upload into. If you want the current event's tag or branch name, use `${{ github.ref }}` (the `refs/tags/` and `refs/heads/` prefixes will be automatically stripped). Defaults to `github.ref`. - `asset_name`: The name the file gets as an asset on a release. Use `$tag` to include the tag name. When not provided it will default to the filename. This is not used if `file_glob` is set to `true`. - `file_glob`: If set to true, the file argument can be a glob pattern (`asset_name` is ignored in this case) (Default: `false`)