Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
fb2d03176f | |||
08d85b1534 | |||
a636f98a4d | |||
288696be39 | |||
6de5d7916c | |||
a485adba73 | |||
26f874e54a | |||
810bfa2cd5 | |||
019fc2114d | |||
a74c6b72af | |||
b909f761f0 | |||
e49d08fa32 | |||
f12ad255e1 | |||
7039a825a7 | |||
f9c2b6ca37 | |||
73738a6293 | |||
a500a35279 | |||
69320dbe05 | |||
9771ccf55f | |||
0a76e4214a | |||
3989e4b325 | |||
72e945e627 | |||
40bf9ec7aa | |||
998623f0c3 | |||
0979303f02 | |||
9b795e5782 | |||
9d7c94cfd0 | |||
6ffed59e55 | |||
1ce812a7bd | |||
3198ee18f8 | |||
7ee8e06381 |
22
.github/release.yml
vendored
Normal file
22
.github/release.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
changelog:
|
||||||
|
exclude:
|
||||||
|
labels:
|
||||||
|
- ignore-for-release
|
||||||
|
- github-actions
|
||||||
|
authors:
|
||||||
|
- octocat
|
||||||
|
- renovate[bot]
|
||||||
|
categories:
|
||||||
|
- title: Breaking Changes 🛠
|
||||||
|
labels:
|
||||||
|
- breaking-change
|
||||||
|
- title: Exciting New Features 🎉
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
- feature
|
||||||
|
- title: Bug fixes 🐛
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
- title: Other Changes 🔄
|
||||||
|
labels:
|
||||||
|
- "*"
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,4 +1,19 @@
|
|||||||
## 2.0.3 (unreleased)
|
## 2.0.6
|
||||||
|
|
||||||
|
- maintenance release with updated dependencies
|
||||||
|
|
||||||
|
## 2.0.5
|
||||||
|
|
||||||
|
- Factor in file names with spaces when upserting files [#446](https://github.com/softprops/action-gh-release/pull/446) via [@MystiPanda](https://github.com/MystiPanda)
|
||||||
|
- Improvements to error handling [#449](https://github.com/softprops/action-gh-release/pull/449) via [@till](https://github.com/till)
|
||||||
|
|
||||||
|
## 2.0.4
|
||||||
|
|
||||||
|
- Minor follow up to [#417](https://github.com/softprops/action-gh-release/pull/417). [#425](https://github.com/softprops/action-gh-release/pull/425)
|
||||||
|
|
||||||
|
## 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
|
## 2.0.2
|
||||||
|
|
||||||
|
16
README.md
16
README.md
@ -75,6 +75,7 @@ GitHub release and all are optional.
|
|||||||
A common case for GitHub releases is to upload your binary after its been validated and packaged.
|
A common case for GitHub releases is to upload your binary after its been validated and packaged.
|
||||||
Use the `with.files` input to declare a newline-delimited list of glob expressions matching the files
|
Use the `with.files` input to declare a newline-delimited list of glob expressions matching the files
|
||||||
you wish to upload to GitHub releases. If you'd like you can just list the files by name directly.
|
you wish to upload to GitHub releases. If you'd like you can just list the files by name directly.
|
||||||
|
If a tag already has a GitHub release, the existing release will be updated with the release assets.
|
||||||
|
|
||||||
Below is an example of uploading a single asset named `Release.txt`
|
Below is an example of uploading a single asset named `Release.txt`
|
||||||
|
|
||||||
@ -154,11 +155,10 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
||||||
|
repository: my_gh_org/my_gh_repo
|
||||||
# note you'll typically need to create a personal access token
|
# note you'll typically need to create a personal access token
|
||||||
# with permissions to create releases in the other repo
|
# with permissions to create releases in the other repo
|
||||||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||||
env:
|
|
||||||
GITHUB_REPOSITORY: my_gh_org/my_gh_repo
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 💅 Customizing
|
### 💅 Customizing
|
||||||
@ -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) |
|
| `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 |
|
| `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 |
|
| `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
|
💡 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.
|
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
|
The following outputs can be accessed via `${{ steps.<step-id>.outputs }}` from this action
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `url` | String | Github.com URL for the release |
|
| `url` | String | Github.com URL for the release |
|
||||||
| `id` | String | Release ID |
|
| `id` | String | Release ID |
|
||||||
| `upload_url` | String | URL for uploading assets to the release |
|
| `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) |
|
| `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.
|
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,8 +46,11 @@ inputs:
|
|||||||
append_body:
|
append_body:
|
||||||
description: "Append to existing body instead of overwriting it. Default is false."
|
description: "Append to existing body instead of overwriting it. Default is false."
|
||||||
required: 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:
|
env:
|
||||||
"GITHUB_TOKEN": "As provided by Github Actions"
|
GITHUB_TOKEN: "As provided by Github Actions"
|
||||||
outputs:
|
outputs:
|
||||||
url:
|
url:
|
||||||
description: "URL to the Release HTML Page"
|
description: "URL to the Release HTML Page"
|
||||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
File diff suppressed because one or more lines are too long
5617
package-lock.json
generated
5617
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "action-gh-release",
|
"name": "action-gh-release",
|
||||||
"version": "0.1.15",
|
"version": "2.0.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "GitHub Action for creating GitHub Releases",
|
"description": "GitHub Action for creating GitHub Releases",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build src/main.ts --minify",
|
"build": "ncc build src/main.ts --minify",
|
||||||
|
"build-debug": "ncc build src/main.ts --v8-cache --source-map",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"fmt": "prettier --write \"src/**/*.ts\" \"__tests__/**/*.ts\"",
|
"fmt": "prettier --write \"src/**/*.ts\" \"__tests__/**/*.ts\"",
|
||||||
"fmtcheck": "prettier --check \"src/**/*.ts\" \"__tests__/**/*.ts\""
|
"fmtcheck": "prettier --check \"src/**/*.ts\" \"__tests__/**/*.ts\"",
|
||||||
|
"updatetag": "git tag -d v2 && git push origin :v2 && git tag -a v2 -m '' && git push origin v2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -21,22 +23,22 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@octokit/plugin-retry": "^4.0.3",
|
"@octokit/plugin-retry": "^7.1.1",
|
||||||
"@octokit/plugin-throttling": "^4.3.2",
|
"@octokit/plugin-throttling": "^9.3.0",
|
||||||
"glob": "^8.0.3",
|
"glob": "^10.4.2",
|
||||||
"mime": "^3.0.0"
|
"mime": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/glob": "^8.0.0",
|
"@types/glob": "^8.1.0",
|
||||||
"@types/jest": "^29.2.3",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/mime": "^3.0.1",
|
"@types/mime": "^3.0.1",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^20.14.9",
|
||||||
"@vercel/ncc": "^0.34.0",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"jest": "^29.3.1",
|
"jest": "^29.3.1",
|
||||||
"jest-circus": "^29.3.1",
|
"jest-circus": "^29.3.1",
|
||||||
"prettier": "2.8.0",
|
"prettier": "2.8.0",
|
||||||
"ts-jest": "^29.0.3",
|
"ts-jest": "^29.2.2",
|
||||||
"typescript": "^4.9.3",
|
"typescript": "^5.5.3",
|
||||||
"typescript-formatter": "^7.2.2"
|
"typescript-formatter": "^7.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
176
src/github.ts
176
src/github.ts
@ -149,7 +149,10 @@ export const upload = async (
|
|||||||
const [owner, repo] = config.github_repository.split("/");
|
const [owner, repo] = config.github_repository.split("/");
|
||||||
const { name, size, mime, data: body } = asset(path);
|
const { name, size, mime, data: body } = asset(path);
|
||||||
const currentAsset = currentAssets.find(
|
const currentAsset = currentAssets.find(
|
||||||
({ name: currentName }) => currentName == name
|
// note: GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "List release assets" endpoint lists the renamed filenames.
|
||||||
|
// due to this renaming we need to be mindful when we compare the file name we're uploading with a name github may already have rewritten for logical comparison
|
||||||
|
// see https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset
|
||||||
|
({ name: currentName }) => currentName == name.replace(" ", ".")
|
||||||
);
|
);
|
||||||
if (currentAsset) {
|
if (currentAsset) {
|
||||||
console.log(`♻️ Deleting previously uploaded asset ${name}...`);
|
console.log(`♻️ Deleting previously uploaded asset ${name}...`);
|
||||||
@ -205,45 +208,63 @@ export const release = async (
|
|||||||
try {
|
try {
|
||||||
// you can't get a an existing draft by tag
|
// you can't get a an existing draft by tag
|
||||||
// so we must find one in the list of all releases
|
// so we must find one in the list of all releases
|
||||||
|
let _release: Release | undefined = undefined;
|
||||||
if (config.input_draft) {
|
if (config.input_draft) {
|
||||||
for await (const response of releaser.allReleases({
|
for await (const response of releaser.allReleases({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
})) {
|
})) {
|
||||||
let release = response.data.find((release) => release.tag_name === tag);
|
_release = response.data.find((release) => release.tag_name === tag);
|
||||||
if (release) {
|
|
||||||
return release;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
_release = (
|
||||||
|
await releaser.getReleaseByTag({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag,
|
||||||
|
})
|
||||||
|
).data;
|
||||||
|
}
|
||||||
|
if (_release === null || _release === undefined) {
|
||||||
|
return await createRelease(
|
||||||
|
tag,
|
||||||
|
config,
|
||||||
|
releaser,
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
discussion_category_name,
|
||||||
|
generate_release_notes,
|
||||||
|
maxRetries
|
||||||
|
);
|
||||||
}
|
}
|
||||||
let existingRelease = await releaser.getReleaseByTag({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
tag,
|
|
||||||
});
|
|
||||||
|
|
||||||
const release_id = existingRelease.data.id;
|
let existingRelease: Release = _release!;
|
||||||
|
console.log(
|
||||||
|
`Found release ${existingRelease.name} (with id=${existingRelease.id})`
|
||||||
|
);
|
||||||
|
|
||||||
|
const release_id = existingRelease.id;
|
||||||
let target_commitish: string;
|
let target_commitish: string;
|
||||||
if (
|
if (
|
||||||
config.input_target_commitish &&
|
config.input_target_commitish &&
|
||||||
config.input_target_commitish !== existingRelease.data.target_commitish
|
config.input_target_commitish !== existingRelease.target_commitish
|
||||||
) {
|
) {
|
||||||
console.log(
|
console.log(
|
||||||
`Updating commit from "${existingRelease.data.target_commitish}" to "${config.input_target_commitish}"`
|
`Updating commit from "${existingRelease.target_commitish}" to "${config.input_target_commitish}"`
|
||||||
);
|
);
|
||||||
target_commitish = config.input_target_commitish;
|
target_commitish = config.input_target_commitish;
|
||||||
} else {
|
} else {
|
||||||
target_commitish = existingRelease.data.target_commitish;
|
target_commitish = existingRelease.target_commitish;
|
||||||
}
|
}
|
||||||
|
|
||||||
const tag_name = tag;
|
const tag_name = tag;
|
||||||
const name = config.input_name || existingRelease.data.name || tag;
|
const name = config.input_name || existingRelease.name || tag;
|
||||||
// revisit: support a new body-concat-strategy input for accumulating
|
// revisit: support a new body-concat-strategy input for accumulating
|
||||||
// body parts as a release gets updated. some users will likely want this while
|
// body parts as a release gets updated. some users will likely want this while
|
||||||
// others won't previously this was duplicating content for most which
|
// others won't previously this was duplicating content for most which
|
||||||
// no one wants
|
// no one wants
|
||||||
const workflowBody = releaseBody(config) || "";
|
const workflowBody = releaseBody(config) || "";
|
||||||
const existingReleaseBody = existingRelease.data.body || "";
|
const existingReleaseBody = existingRelease.body || "";
|
||||||
let body: string;
|
let body: string;
|
||||||
if (config.input_append_body && workflowBody && existingReleaseBody) {
|
if (config.input_append_body && workflowBody && existingReleaseBody) {
|
||||||
body = existingReleaseBody + "\n" + workflowBody;
|
body = existingReleaseBody + "\n" + workflowBody;
|
||||||
@ -254,11 +275,11 @@ export const release = async (
|
|||||||
const draft =
|
const draft =
|
||||||
config.input_draft !== undefined
|
config.input_draft !== undefined
|
||||||
? config.input_draft
|
? config.input_draft
|
||||||
: existingRelease.data.draft;
|
: existingRelease.draft;
|
||||||
const prerelease =
|
const prerelease =
|
||||||
config.input_prerelease !== undefined
|
config.input_prerelease !== undefined
|
||||||
? config.input_prerelease
|
? config.input_prerelease
|
||||||
: existingRelease.data.prerelease;
|
: existingRelease.prerelease;
|
||||||
|
|
||||||
const make_latest = config.input_make_latest;
|
const make_latest = config.input_make_latest;
|
||||||
|
|
||||||
@ -278,52 +299,87 @@ export const release = async (
|
|||||||
});
|
});
|
||||||
return release.data;
|
return release.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status === 404) {
|
if (error.status !== 404) {
|
||||||
const tag_name = tag;
|
|
||||||
const name = config.input_name || tag;
|
|
||||||
const body = releaseBody(config);
|
|
||||||
const draft = config.input_draft;
|
|
||||||
const prerelease = config.input_prerelease;
|
|
||||||
const target_commitish = config.input_target_commitish;
|
|
||||||
const make_latest = config.input_make_latest;
|
|
||||||
let commitMessage: string = "";
|
|
||||||
if (target_commitish) {
|
|
||||||
commitMessage = ` using commit "${target_commitish}"`;
|
|
||||||
}
|
|
||||||
console.log(
|
|
||||||
`👩🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`
|
|
||||||
);
|
|
||||||
try {
|
|
||||||
let release = await releaser.createRelease({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
tag_name,
|
|
||||||
name,
|
|
||||||
body,
|
|
||||||
draft,
|
|
||||||
prerelease,
|
|
||||||
target_commitish,
|
|
||||||
discussion_category_name,
|
|
||||||
generate_release_notes,
|
|
||||||
make_latest,
|
|
||||||
});
|
|
||||||
return release.data;
|
|
||||||
} catch (error) {
|
|
||||||
// presume a race with competing metrix runs
|
|
||||||
console.log(
|
|
||||||
`⚠️ GitHub release failed with status: ${
|
|
||||||
error.status
|
|
||||||
}\n${JSON.stringify(error.response.data.errors)}\nretrying... (${
|
|
||||||
maxRetries - 1
|
|
||||||
} retries remaining)`
|
|
||||||
);
|
|
||||||
return release(config, releaser, maxRetries - 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log(
|
console.log(
|
||||||
`⚠️ Unexpected error fetching GitHub release for tag ${config.github_ref}: ${error}`
|
`⚠️ Unexpected error fetching GitHub release for tag ${config.github_ref}: ${error}`
|
||||||
);
|
);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return await createRelease(
|
||||||
|
tag,
|
||||||
|
config,
|
||||||
|
releaser,
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
discussion_category_name,
|
||||||
|
generate_release_notes,
|
||||||
|
maxRetries
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function createRelease(
|
||||||
|
tag: string,
|
||||||
|
config: Config,
|
||||||
|
releaser: Releaser,
|
||||||
|
owner: string,
|
||||||
|
repo: string,
|
||||||
|
discussion_category_name: string | undefined,
|
||||||
|
generate_release_notes: boolean | undefined,
|
||||||
|
maxRetries: number
|
||||||
|
) {
|
||||||
|
const tag_name = tag;
|
||||||
|
const name = config.input_name || tag;
|
||||||
|
const body = releaseBody(config);
|
||||||
|
const draft = config.input_draft;
|
||||||
|
const prerelease = config.input_prerelease;
|
||||||
|
const target_commitish = config.input_target_commitish;
|
||||||
|
const make_latest = config.input_make_latest;
|
||||||
|
let commitMessage: string = "";
|
||||||
|
if (target_commitish) {
|
||||||
|
commitMessage = ` using commit "${target_commitish}"`;
|
||||||
|
}
|
||||||
|
console.log(
|
||||||
|
`👩🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`
|
||||||
|
);
|
||||||
|
try {
|
||||||
|
let release = await releaser.createRelease({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag_name,
|
||||||
|
name,
|
||||||
|
body,
|
||||||
|
draft,
|
||||||
|
prerelease,
|
||||||
|
target_commitish,
|
||||||
|
discussion_category_name,
|
||||||
|
generate_release_notes,
|
||||||
|
make_latest,
|
||||||
|
});
|
||||||
|
return release.data;
|
||||||
|
} catch (error) {
|
||||||
|
// presume a race with competing matrix runs
|
||||||
|
console.log(`⚠️ GitHub release failed with status: ${error.status}`);
|
||||||
|
console.log(`${JSON.stringify(error.response.data)}`);
|
||||||
|
|
||||||
|
switch (error.status) {
|
||||||
|
case 403:
|
||||||
|
console.log(
|
||||||
|
"Skip retry — your GitHub token/PAT does not have the required permission to create a release"
|
||||||
|
);
|
||||||
|
throw error;
|
||||||
|
|
||||||
|
case 404:
|
||||||
|
console.log("Skip retry - discussion category mismatch");
|
||||||
|
throw error;
|
||||||
|
|
||||||
|
case 422:
|
||||||
|
console.log("Skip retry - validation failed");
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`retrying... (${maxRetries - 1} retries remaining)`);
|
||||||
|
return release(config, releaser, maxRetries - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -67,7 +67,11 @@ async function run() {
|
|||||||
if (config.input_files && config.input_files.length > 0) {
|
if (config.input_files && config.input_files.length > 0) {
|
||||||
const files = paths(config.input_files);
|
const files = paths(config.input_files);
|
||||||
if (files.length == 0) {
|
if (files.length == 0) {
|
||||||
throw new Error(`⚠️ ${config.input_files} not include valid file.`);
|
if (config.input_fail_on_unmatched_files) {
|
||||||
|
throw new Error(`⚠️ ${config.input_files} not include valid file.`);
|
||||||
|
} else {
|
||||||
|
console.warn(`🤔 ${config.input_files} not include valid file.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const currentAssets = rel.assets;
|
const currentAssets = rel.assets;
|
||||||
const assets = await Promise.all(
|
const assets = await Promise.all(
|
||||||
|
Reference in New Issue
Block a user