upload-release/action.yml
Harikrishnan Balagopal 14e1242349
feat!: add support for uploading to release drafts
When we try to get a release by tag, it doesn't
return release drafts. In order to get release
drafts we need to list the releases using a token
that has write access on the repo.

Also added tests for the same.

BREAKING CHANGE: Changed behaviour to not create
a new release. Only upload to existing releases.
Also updated the action inputs to reflect the same.

Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
2020-12-09 17:12:43 +05:30

51 lines
1.5 KiB
YAML

name: "Upload files to a GitHub release"
description: "Upload files to a GitHub release (cross-platform)"
author: "Sven-Hendrik Haase"
branding:
icon: archive
color: orange
inputs:
repo_token:
required: true
description: "GitHub token."
tag:
required: true
description: "Tag of the release."
file:
required: true
description: |
Path to the file to upload.
If this is a glob pattern then set file_glob to true.
file_glob:
required: false
description: |
If true the file can be a glob pattern.
asset_name will be ignored if this is true.
default: "false"
asset_name:
required: false
description: |
By default the uploaded asset name will be same as the file name.
Use this to override the asset name. If asset_name contains the
string "$tag", it will get replaced by the release tag.
Unused if file_glob is set to true.
overwrite:
required: false
description: |
By default if an asset already exists with the same name, this action will fail.
Use this to overwrite the asset instead.
default: "false"
repo_name:
required: false
description: |
If the release exists in a different repository then specify its name.
It is required to create a personal access token with `repo`, `user`,
and `admin:repo_hook` scopes to the external repository and give that
as the repo_token.
outputs:
browser_download_url:
description: "The publicly available URL of the asset."
runs:
using: "node12"
main: "dist/index.js"