Compare commits
7 Commits
v0.1.12
...
debug-cros
Author | SHA1 | Date | |
---|---|---|---|
e6268c631a | |||
8988630456 | |||
c1b107442c | |||
4c8c431191 | |||
1505034bb0 | |||
21e9098c3b | |||
26941a6e6b |
@ -1,11 +1,3 @@
|
||||
## 0.1.12
|
||||
|
||||
- fix bug leading to empty strings subsituted for inputs users don't provide breaking api calls [#144](https://github.com/softprops/action-gh-release/pull/144)
|
||||
|
||||
## 0.1.11
|
||||
|
||||
- better error message on release create failed [#143](https://github.com/softprops/action-gh-release/pull/143)
|
||||
|
||||
## 0.1.10
|
||||
|
||||
- fixed error message formatting for file uploads
|
||||
|
@ -11,7 +11,7 @@ import * as assert from "assert";
|
||||
|
||||
describe("util", () => {
|
||||
describe("uploadUrl", () => {
|
||||
it("strips template", () => {
|
||||
it("stripts template", () => {
|
||||
assert.equal(
|
||||
uploadUrl(
|
||||
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}"
|
||||
@ -95,18 +95,7 @@ describe("util", () => {
|
||||
});
|
||||
describe("parseConfig", () => {
|
||||
it("parses basic config", () => {
|
||||
assert.deepStrictEqual(
|
||||
parseConfig({
|
||||
// note: inputs declared in actions.yml, even when declared not required,
|
||||
// are still provided by the actions runtime env as empty strings instead of
|
||||
// the normal absent env value one would expect. this breaks things
|
||||
// as an empty string !== undefined in terms of what we pass to the api
|
||||
// so we cover that in a test case here to ensure undefined values are actually
|
||||
// resolved as undefined and not empty strings
|
||||
INPUT_TARGET_COMMITISH: "",
|
||||
INPUT_DISCUSSION_CATEGORY_NAME: ""
|
||||
}),
|
||||
{
|
||||
assert.deepStrictEqual(parseConfig({}), {
|
||||
github_ref: "",
|
||||
github_repository: "",
|
||||
github_token: "",
|
||||
@ -120,8 +109,7 @@ describe("util", () => {
|
||||
input_fail_on_unmatched_files: false,
|
||||
input_target_commitish: undefined,
|
||||
input_discussion_category_name: undefined
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("parses basic config with commitish", () => {
|
||||
|
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.12",
|
||||
"version": "0.1.10",
|
||||
"private": true,
|
||||
"description": "GitHub Action for creating GitHub Releases",
|
||||
"main": "lib/main.js",
|
||||
|
@ -271,7 +271,7 @@ export const release = async (
|
||||
commitMessage = ` using commit "${target_commitish}"`;
|
||||
}
|
||||
console.log(
|
||||
`👩🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`
|
||||
`👩🏭 Creating new GitHub release in ${owner}/${repo} for tag ${tag_name}${commitMessage}...`
|
||||
);
|
||||
try {
|
||||
let release = await releaser.createRelease({
|
||||
|
@ -63,9 +63,8 @@ export const parseConfig = (env: Env): Config => {
|
||||
? env.INPUT_PRERELEASE == "true"
|
||||
: undefined,
|
||||
input_fail_on_unmatched_files: env.INPUT_FAIL_ON_UNMATCHED_FILES == "true",
|
||||
input_target_commitish: env.INPUT_TARGET_COMMITISH || undefined,
|
||||
input_discussion_category_name:
|
||||
env.INPUT_DISCUSSION_CATEGORY_NAME || undefined
|
||||
input_target_commitish: env.INPUT_TARGET_COMMITISH,
|
||||
input_discussion_category_name: env.INPUT_DISCUSSION_CATEGORY_NAME
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user