From 9ae523dc91784bb40404abce21b4ad5f73d36713 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sat, 9 May 2020 15:05:14 -0700 Subject: [PATCH] chore: fiddling with configuration --- .../{release.yaml => update-pr.yaml} | 2 +- index.js | 26 +++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) rename .github/workflows/{release.yaml => update-pr.yaml} (94%) diff --git a/.github/workflows/release.yaml b/.github/workflows/update-pr.yaml similarity index 94% rename from .github/workflows/release.yaml rename to .github/workflows/update-pr.yaml index 6ebb73d..12d2caf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/update-pr.yaml @@ -4,7 +4,7 @@ on: - master name: coverage jobs: - coveralls: + update-pr: runs-on: ubuntu-latest steps: - uses: bcoe/release-please-action@master diff --git a/index.js b/index.js index e242469..d35a395 100644 --- a/index.js +++ b/index.js @@ -10,24 +10,16 @@ async function main () { const releaseType = core.getInput('release-type') const name = core.getInput('name') - switch (action) { - case 'update-pr': { - const release = ReleasePRFactory.build(releaseType, { - packageName: name || 'unknown', - apiUrl: 'https://api.github.com', - repoUrl: process.env.GITHUB_REPOSITORY, - token: token, - label: RELEASE_LABEL - }) - await release.run() - break - } - default: - core.setFailed(`unknown action, ${action}, should be "update-pr", or "create-release".`) - break - } + const release = ReleasePRFactory.build(releaseType, { + packageName: name || 'unknown', + apiUrl: 'https://api.github.com', + repoUrl: process.env.GITHUB_REPOSITORY, + token: token, + label: RELEASE_LABEL + }) + await release.run() } main().catch(err => { - core.setFailed(`release-please failed to ${action} (${err.message})`) + core.setFailed(`release-please failed: ${err.message}`) })