Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ce0a13e83 | ||
|
|
6ca3eb1422 | ||
|
|
54a6699008 | ||
|
|
afb12c9a16 | ||
|
|
89767936cf | ||
|
|
d3d2e8da76 |
@@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.1.1] - 2020-09-25
|
||||||
|
- Fix `release_name` option [#27](https://github.com/svenstaro/upload-release-action/pull/27) (thanks @kittaakos)
|
||||||
|
|
||||||
## [2.1.0] - 2020-08-10
|
## [2.1.0] - 2020-08-10
|
||||||
- Strip refs/heads/ from the input tag [#23](https://github.com/svenstaro/upload-release-action/pull/23) (thanks @OmarEmaraDev)
|
- Strip refs/heads/ from the input tag [#23](https://github.com/svenstaro/upload-release-action/pull/23) (thanks @OmarEmaraDev)
|
||||||
|
|
||||||
|
|||||||
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -2211,7 +2211,7 @@ function get_release_by_tag(tag, prerelease, release_name, body, octokit) {
|
|||||||
// If this returns 404, we need to create the release first.
|
// If this returns 404, we need to create the release first.
|
||||||
if (error.status === 404) {
|
if (error.status === 404) {
|
||||||
core.debug(`Release for tag ${tag} doesn't exist yet so we'll create it now.`);
|
core.debug(`Release for tag ${tag} doesn't exist yet so we'll create it now.`);
|
||||||
return yield octokit.repos.createRelease(Object.assign(Object.assign({}, github.context.repo), { tag_name: tag, prerelease: prerelease, release_name: release_name, body: body }));
|
return yield octokit.repos.createRelease(Object.assign(Object.assign({}, github.context.repo), { tag_name: tag, prerelease: prerelease, name: release_name, body: body }));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw error;
|
throw error;
|
||||||
@@ -2263,7 +2263,10 @@ function run() {
|
|||||||
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
|
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
|
||||||
const token = core.getInput('repo_token', { required: true });
|
const token = core.getInput('repo_token', { required: true });
|
||||||
const file = core.getInput('file', { required: true });
|
const file = core.getInput('file', { required: true });
|
||||||
const tag = core.getInput('tag', { required: true }).replace('refs/tags/', '').replace('refs/heads/', '');
|
const tag = core
|
||||||
|
.getInput('tag', { required: true })
|
||||||
|
.replace('refs/tags/', '')
|
||||||
|
.replace('refs/heads/', '');
|
||||||
const file_glob = core.getInput('file_glob') == 'true' ? true : false;
|
const file_glob = core.getInput('file_glob') == 'true' ? true : false;
|
||||||
const overwrite = core.getInput('overwrite') == 'true' ? true : false;
|
const overwrite = core.getInput('overwrite') == 'true' ? true : false;
|
||||||
const prerelease = core.getInput('prerelease') == 'true' ? true : false;
|
const prerelease = core.getInput('prerelease') == 'true' ? true : false;
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "upload-release-action",
|
"name": "upload-release-action",
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -6860,9 +6860,9 @@
|
|||||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||||
},
|
},
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||||
},
|
},
|
||||||
"node-int64": {
|
"node-int64": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "upload-release-action",
|
"name": "upload-release-action",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Upload files to a GitHub release",
|
"description": "Upload files to a GitHub release",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ async function get_release_by_tag(
|
|||||||
...github.context.repo,
|
...github.context.repo,
|
||||||
tag_name: tag,
|
tag_name: tag,
|
||||||
prerelease: prerelease,
|
prerelease: prerelease,
|
||||||
release_name: release_name,
|
name: release_name,
|
||||||
body: body
|
body: body
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user