Merge remote-tracking branch 'upstream/master' into default-token
This commit is contained in:
commit
05d11c9fe8
11
README.md
11
README.md
@ -154,6 +154,8 @@ jobs:
|
|||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
with:
|
||||||
body_path: ${{ github.workflow }}-CHANGELOG.txt
|
body_path: ${{ github.workflow }}-CHANGELOG.txt
|
||||||
|
env:
|
||||||
|
GITHUB_REPOSITORY: my_gh_org/my_gh_repo
|
||||||
```
|
```
|
||||||
|
|
||||||
### 💅 Customizing
|
### 💅 Customizing
|
||||||
@ -163,7 +165,7 @@ jobs:
|
|||||||
The following are optional as `step.with` keys
|
The following are optional as `step.with` keys
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|---------------------------|---------|---------------------------------------------------------------------------------------------|
|
|---------------------------|---------|-----------------------------------------------------------------------|
|
||||||
| `body` | String | Text communicating notable changes in this release |
|
| `body` | String | Text communicating notable changes in this release |
|
||||||
| `body_path` | String | Path to load text communicating notable changes in this release |
|
| `body_path` | String | Path to load text communicating notable changes in this release |
|
||||||
| `draft` | Boolean | Indicator of whether or not this release is a draft |
|
| `draft` | Boolean | Indicator of whether or not this release is a draft |
|
||||||
@ -171,7 +173,6 @@ The following are optional as `step.with` keys
|
|||||||
| `files` | String | Newline-delimited globs of paths to assets to upload for release |
|
| `files` | String | Newline-delimited globs of paths to assets to upload for release |
|
||||||
| `name` | String | Name of the release. defaults to tag name |
|
| `name` | String | Name of the release. defaults to tag name |
|
||||||
| `tag_name` | String | Name of a tag. defaults to `github.ref` |
|
| `tag_name` | String | Name of a tag. defaults to `github.ref` |
|
||||||
| `repository` | String | Name of a target repository in `<owner>/<repo>` format. Defaults to the current repository. |
|
|
||||||
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing|
|
| `fail_on_unmatched_files` | Boolean | Indicator of whether to fail if any of the `files` globs match nothing|
|
||||||
| `token` | String | Secret GitHub Personal Access Token. Defaults to `${{ github.token }}`|
|
| `token` | String | Secret GitHub Personal Access Token. Defaults to `${{ github.token }}`|
|
||||||
|
|
||||||
@ -182,8 +183,9 @@ The following are optional as `step.with` keys
|
|||||||
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 |
|
||||||
|
| `upload_url`| String | URL for uploading assets to the release |
|
||||||
|
|
||||||
|
|
||||||
#### environment variables
|
#### environment variables
|
||||||
@ -191,8 +193,9 @@ The following outputs can be accessed via `${{ steps.<step-id>.outputs }}` from
|
|||||||
The following `step.env` keys are allowed as a fallback but deprecated in favor of using inputs.
|
The following `step.env` keys are allowed as a fallback but deprecated in favor of using inputs.
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
|----------------|---------------------------------------|
|
|----------------|------------------------------------------------------------------------------------------------|
|
||||||
| `GITHUB_TOKEN` | GITHUB_TOKEN as provided by `secrets` |
|
| `GITHUB_TOKEN` | GITHUB_TOKEN as provided by `secrets` |
|
||||||
|
| `GITHUB_REPOSITORY` | Name of a target repository in `<owner>/<repo>` format. defaults to the current repository|
|
||||||
|
|
||||||
|
|
||||||
> **⚠️ Note:** This action was previously implemented as a Docker container, limiting its use to GitHub Actions Linux virtual environments only. With recent releases, we now support cross platform usage. You'll need to remove the `docker://` prefix in these versions
|
> **⚠️ Note:** This action was previously implemented as a Docker container, limiting its use to GitHub Actions Linux virtual environments only. With recent releases, we now support cross platform usage. You'll need to remove the `docker://` prefix in these versions
|
||||||
|
@ -58,9 +58,9 @@ describe("util", () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("defaults to body when both body and body path are provided", () => {
|
it("defaults to body path when both body and body path are provided", () => {
|
||||||
assert.equal(
|
assert.equal(
|
||||||
"foo",
|
"bar",
|
||||||
releaseBody({
|
releaseBody({
|
||||||
github_ref: "",
|
github_ref: "",
|
||||||
github_repository: "",
|
github_repository: "",
|
||||||
|
@ -39,6 +39,8 @@ env:
|
|||||||
outputs:
|
outputs:
|
||||||
url:
|
url:
|
||||||
description: 'URL to the Release HTML Page'
|
description: 'URL to the Release HTML Page'
|
||||||
|
upload_url:
|
||||||
|
description: 'URL for uploading assets to the release'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
@ -55,6 +55,7 @@ async function run() {
|
|||||||
}
|
}
|
||||||
console.log(`🎉 Release ready at ${rel.html_url}`);
|
console.log(`🎉 Release ready at ${rel.html_url}`);
|
||||||
setOutput("url", rel.html_url);
|
setOutput("url", rel.html_url);
|
||||||
|
setOutput("upload_url", rel.upload_url);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setFailed(error.message);
|
setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@ export interface Config {
|
|||||||
|
|
||||||
export const releaseBody = (config: Config): string | undefined => {
|
export const releaseBody = (config: Config): string | undefined => {
|
||||||
return (
|
return (
|
||||||
config.input_body ||
|
|
||||||
(config.input_body_path &&
|
(config.input_body_path &&
|
||||||
readFileSync(config.input_body_path).toString("utf8"))
|
readFileSync(config.input_body_path).toString("utf8")) ||
|
||||||
|
config.input_body
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user