Update README.md (#188)

This commit is contained in:
Eder Matos
2022-03-31 11:56:55 -03:00
committed by GitHub
parent 6ba4f20c9a
commit 918a7af1fe

View File

@@ -3,36 +3,39 @@
This action will create a GitHub release and optionally upload an artifact to it. This action will create a GitHub release and optionally upload an artifact to it.
## Action Inputs ## Action Inputs
- **allowUpdates**: An optional flag which indicates if we should update a release if it already exists. Defaults to `false`. | Input name | Description | Required | Default Value |
- **artifactErrorsFailBuild**: An optional flag which indicates if artifact read or upload errors should fail the build. |---------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------|-----------|---------------|
- **artifact** (deprecated): An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs). | allowUpdates | An optional flag which indicates if we should update a release if it already exists. Defaults to false. | false | "" |
- **artifacts**: An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs). | artifactErrorsFailBuild | An optional flag which indicates if artifact read or upload errors should fail the build. | false | "" |
- **artifactContentType**: The content type of the artifact. Defaults to `raw`. | artifact | An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs) | false | "" |
- **body**: An optional body for the release. | artifacts | An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs) | false | "" |
- **bodyFile**: An optional body file for the release. This should be the path to the file. | artifactContentType | The content type of the artifact. Defaults to raw | false | "" |
- **commit**: An optional commit reference. This will be used to create the tag if it does not exist. | body | An optional body for the release. | false | "" |
- **discussionCategory**: When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases. | bodyFile | An optional body file for the release. This should be the path to the file | false | "" |
- **draft**: Optionally marks this release as a draft release. Set to `true` to enable. | commit | An optional commit reference. This will be used to create the tag if it does not exist. | false | "" |
- **generateReleaseNotes**: Indicates if release notes should be automatically generated. Set to `true` to enable. | discussionCategory | When provided this will generate a discussion of the specified category. The category must exist otherwise this will cause the action to fail. This isn't used with draft releases | false | false
- **name**: An optional name for the release. If this is omitted the tag will be used. | draft | Optionally marks this release as a draft release. Set to true to enable. | false | "" |
- **omitBody**: Indicates if the release body should be omitted. | generateReleaseNotes | Indicates if release notes should be automatically generated. | false | false |
- **omitBodyDuringUpdate**: Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates. | name | An optional name for the release. If this is omitted the tag will be used. | false | "" |
- **omitName**: Indicates if the release name should be omitted. | omitBody | Indicates if the release body should be omitted. | false | false |
- **omitNameDuringUpdate**: Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates. | omitBodyDuringUpdate | Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates. | false | false
- **omitPrereleaseDuringUpdate**: Indicates if the prerelease flag should be omitted during updates. The prerelease flag will still be applied for newly created releases. | omitName | Indicates if the release name should be omitted. | false | false |
This will preserve the existing prerelease state during updates. | omitNameDuringUpdate | Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates. | false | false
- **owner**: Optionally specify the owner of the repo where the release should be generated. Defaults to current repo's owner. Example - `ncipollo`. | omitPrereleaseDuringUpdate | Indicates if the prerelease flag should be omitted during updates. The prerelease flag will still be applied for newly created releases. This will preserve the existing prerelease state during updates. | false | false
- **prerelease**: Optionally marks this release as prerelease. Set to true to enable. | owner | Optionally specify the owner of the repo where the release should be generated. Defaults to current repo'sowner. | false | "" |
- **removeArtifacts**: Indicates if existing release artifacts should be removed. Defaults to `false`. | prerelease | Optionally marks this release as prerelease. Set to true to enable. | false | "" |
- **replacesArtifacts**: Indicates if existing release artifacts should be replaced. Defaults to `true`. | removeArtifacts | Indicates if existing release artifacts should be removed. | false | false |
- **repo**: Optionally specify the repo where the release should be generated. Defaults to current repo. Example - `release-action`. | replacesArtifacts | Indicates if existing release artifacts should be replaced. | false | true |
- **tag**: An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | repo | Optionally specify the repo where the release should be generated. | false | current repo |
- **token**: The GitHub token. Typically, this will be `${{ secrets.GITHUB_TOKEN }}`. If you are using a personal access token it should have access to the `repo` scope. | tag | An optional tag for the release. If this is omitted the git ref will be used (if it is a tag). | false | "" |
| token | The GitHub token. Typically, this will be `${{ secrets.GITHUB_TOKEN }}`. If you are using a personal access token it should have access to the `repo` scope. | false | github.token |
## Action Outputs ## Action Outputs
- **id**: The identifier of the created release. | Output name | Description |
- **html_url**: The HTML URL of the release. |-------------|-----------------------------------------------|
- **upload_url**: The URL for uploading assets to the release. | id | The identifier of the created release. |
| html_url | The HTML URL of the release. |
| upload_url | The URL for uploading assets to the release. |
## Example ## Example
This example will create a release when a tag is pushed: This example will create a release when a tag is pushed: