Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
3198ee18f8 | |||
7ee8e06381 | |||
d99959edae | |||
0e39c679e8 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,4 +1,12 @@
|
||||
## 2.0.2 (unreleased)
|
||||
## 2.0.4 (unreleased)
|
||||
|
||||
## 2.0.3
|
||||
|
||||
- Declare `make_latest` as an input field in `action.yml` [#419](https://github.com/softprops/action-gh-release/pull/419)
|
||||
|
||||
## 2.0.2
|
||||
|
||||
- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in [#417](https://github.com/softprops/action-gh-release/pull/417)
|
||||
|
||||
## 2.0.1
|
||||
|
||||
|
12
README.md
12
README.md
@ -183,7 +183,7 @@ The following are optional as `step.with` keys
|
||||
| `discussion_category_name` | String | If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see ["Managing categories for discussions in your repository."](https://docs.github.com/en/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository) |
|
||||
| `generate_release_notes` | Boolean | Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes. See the [GitHub docs for this feature](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) for more information |
|
||||
| `append_body` | Boolean | Append to existing body instead of overwriting it |
|
||||
| `make_latest` | Boolean | Whether to mark the release as latest or not. |
|
||||
| `make_latest` | String | Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Can be `true`, `false`, or `legacy`. Uses GitHub api defaults if not provided |
|
||||
|
||||
💡 When providing a `body` and `body_path` at the same time, `body_path` will be
|
||||
attempted first, then falling back on `body` if the path can not be read from.
|
||||
@ -196,11 +196,11 @@ release will retain its original info.
|
||||
|
||||
The following outputs can be accessed via `${{ steps.<step-id>.outputs }}` from this action
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `url` | String | Github.com URL for the release |
|
||||
| `id` | String | Release ID |
|
||||
| `upload_url` | String | URL for uploading assets to the release |
|
||||
| Name | Type | Description |
|
||||
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `url` | String | Github.com URL for the release |
|
||||
| `id` | String | Release ID |
|
||||
| `upload_url` | String | URL for uploading assets to the release |
|
||||
| `assets` | String | JSON array containing information about each uploaded asset, in the format given [here](https://docs.github.com/en/rest/releases/assets#get-a-release-asset) (minus the `uploader` field) |
|
||||
|
||||
As an example, you can use `${{ fromJSON(steps.<step-id>.outputs.assets)[0].browser_download_url }}` to get the download URL of the first asset.
|
||||
|
@ -46,6 +46,9 @@ inputs:
|
||||
append_body:
|
||||
description: "Append to existing body instead of overwriting it. Default is false."
|
||||
required: false
|
||||
make_latest:
|
||||
description: "Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Can be `true`, `false`, or `legacy`. Uses GitHub api default if not provided"
|
||||
required: false
|
||||
env:
|
||||
"GITHUB_TOKEN": "As provided by Github Actions"
|
||||
outputs:
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "action-gh-release",
|
||||
"version": "0.1.15",
|
||||
"version": "2.0.3",
|
||||
"private": true,
|
||||
"description": "GitHub Action for creating GitHub Releases",
|
||||
"main": "lib/main.js",
|
||||
|
@ -25,7 +25,11 @@ async function run() {
|
||||
if (config.input_files) {
|
||||
const patterns = unmatchedPatterns(config.input_files);
|
||||
patterns.forEach((pattern) => {
|
||||
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`);
|
||||
if (config.input_fail_on_unmatched_files) {
|
||||
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`);
|
||||
} else {
|
||||
console.warn(`🤔 Pattern '${pattern}' does not match any files.`);
|
||||
}
|
||||
});
|
||||
if (patterns.length > 0 && config.input_fail_on_unmatched_files) {
|
||||
throw new Error(`⚠️ There were unmatched files`);
|
||||
|
Reference in New Issue
Block a user