generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
e74ff71
commit 5c0676c
Showing
9 changed files
with
16,362 additions
and
12,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,50 @@ | ||
name: 'Upload files to a GitHub release' | ||
description: 'Upload files to a GitHub release (cross-platform)' | ||
author: 'Sven-Hendrik Haase' | ||
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: | ||
description: 'GitHub token.' | ||
required: true | ||
file: | ||
description: 'Local file to upload.' | ||
required: true | ||
description: "GitHub token." | ||
tag: | ||
description: 'Tag to use as a release.' | ||
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: | ||
description: 'Name of the asset. When not provided will use the file name. Unused if file_glob is set to "true".' | ||
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: | ||
description: 'Overwrite the release in case it already exists.' | ||
file_glob: | ||
description: 'If true the file can be a glob pattern, asset_name is ignored if this is true.' | ||
prerelease: | ||
description: 'Mark the release as a pre-release. Defaults to "false".' | ||
release_name: | ||
description: 'Explicitly set a release name. Defaults to empty which will cause the release to take the tag as name on GitHub.' | ||
body: | ||
description: 'Content of the release text. Empty by default.' | ||
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: | ||
description: 'Specify the name of the GitHub repository in which the GitHub release will be created, edited, and deleted. If the repository is other than the current, it is required to create a personal access token with `repo`, `user`, `admin:repo_hook` scopes to the foreign repository and add it as a secret. Defaults to the current repository' | ||
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.' | ||
description: "The publicly available URL of the asset." | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' | ||
using: "node12" | ||
main: "dist/index.js" |
Oops, something went wrong.