diff --git a/README.md b/README.md index f1eabe5..d999998 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ Add following step to your workflow: ```yaml - uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: - delete_release: true # default: true - delete_draft_release: true # default: false; only applicable if delete_release == true + delete_release: true # default: false tag_name: v0.1.0 # tag name to delete repo: / # target repo (optional). defaults to repo running this action env: diff --git a/action.yml b/action.yml index 2e1c2a8..f12eeb0 100644 --- a/action.yml +++ b/action.yml @@ -14,10 +14,6 @@ inputs: description: whether to delete release or not required: false default: true - delete_draft_release: - description: whether to also delete draft releases - required: false - default: false repo: description: target repository as / required: false diff --git a/index.js b/index.js index 20dc9bc..bd84371 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,6 @@ if (!process.env.INPUT_TAG_NAME) { const tagName = process.env.INPUT_TAG_NAME; const shouldDeleteRelease = process.env.INPUT_DELETE_RELEASE === "true"; -const shouldDeleteDraftRelease = process.env.INPUT_DELETE_DRAFT_RELEASE === "true"; const commonOpts = { host: "api.github.com", @@ -75,7 +74,7 @@ async function deleteReleases() { method: "GET", }); releaseIds = (data || []) - .filter(({ tag_name, draft }) => tag_name === tagName && shouldDeleteDraftRelease ? true : (draft === false)) + .filter(({ tag_name, draft }) => tag_name === tagName && draft === false) .map(({ id }) => id); } catch (error) { console.error(`🌶 failed to get list of releases <- ${error.message}`);