mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-13 15:11:37 +02:00
chore: build dist release-please-action (#236)
This commit is contained in:
committed by
GitHub
parent
6dc3f3dcd9
commit
59a01bf6ab
43
dist/index.js
vendored
43
dist/index.js
vendored
@@ -12,25 +12,29 @@ const RELEASE_LABEL = 'autorelease: pending'
|
|||||||
const GITHUB_RELEASE_COMMAND = 'github-release'
|
const GITHUB_RELEASE_COMMAND = 'github-release'
|
||||||
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
|
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
|
||||||
|
|
||||||
async function main () {
|
function getBooleanInput (input) {
|
||||||
const bumpMinorPreMajor = Boolean(core.getInput('bump-minor-pre-major'))
|
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON']
|
||||||
const monorepoTags = Boolean(core.getInput('monorepo-tags'))
|
const falseValue = ['false', 'False', 'FALSE', 'no', 'No', 'NO', 'n', 'N', 'off', 'Off', 'OFF']
|
||||||
const packageName = core.getInput('package-name')
|
const stringInput = core.getInput(input)
|
||||||
const path = core.getInput('path') ? core.getInput('path') : undefined
|
if (trueValue.indexOf(stringInput) > -1) return true
|
||||||
const releaseType = core.getInput('release-type')
|
if (falseValue.indexOf(stringInput) > -1) return false
|
||||||
const token = core.getInput('token')
|
throw TypeError(`Wrong boolean value of the input '${input}'`)
|
||||||
const fork = core.getInput('fork') ? true : undefined
|
}
|
||||||
const changelogPath = core.getInput('changelog-path') ? core.getInput('changelog-path') : undefined
|
|
||||||
const changelogTypes = core.getInput('changelog-types')
|
|
||||||
const command = core.getInput('command') ? core.getInput('command') : undefined
|
|
||||||
const versionFile = core.getInput('version-file') ? core.getInput('version-file') : undefined
|
|
||||||
const defaultBranch = core.getInput('default-branch') ? core.getInput('default-branch') : undefined
|
|
||||||
|
|
||||||
// Parse the changelogTypes if there are any
|
async function main () {
|
||||||
let changelogSections
|
const bumpMinorPreMajor = getBooleanInput('bump-minor-pre-major')
|
||||||
if (changelogTypes) {
|
const monorepoTags = getBooleanInput('monorepo-tags')
|
||||||
changelogSections = JSON.parse(changelogTypes)
|
const packageName = core.getInput('package-name', { required: true })
|
||||||
}
|
const path = core.getInput('path') || undefined
|
||||||
|
const releaseType = core.getInput('release-type', { required: true })
|
||||||
|
const token = core.getInput('token', { required: true })
|
||||||
|
const fork = getBooleanInput('fork')
|
||||||
|
const changelogPath = core.getInput('changelog-path') || undefined
|
||||||
|
const changelogTypes = core.getInput('changelog-types')
|
||||||
|
const changelogSections = changelogTypes && JSON.parse(changelogTypes)
|
||||||
|
const command = core.getInput('command') || undefined
|
||||||
|
const versionFile = core.getInput('version-file') || undefined
|
||||||
|
const defaultBranch = core.getInput('default-branch') || undefined
|
||||||
|
|
||||||
// First we check for any merged release PRs (PRs merged with the label
|
// First we check for any merged release PRs (PRs merged with the label
|
||||||
// "autorelease: pending"):
|
// "autorelease: pending"):
|
||||||
@@ -81,7 +85,8 @@ async function main () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const releasePlease = {
|
const releasePlease = {
|
||||||
main
|
main,
|
||||||
|
getBooleanInput
|
||||||
}
|
}
|
||||||
|
|
||||||
if (require.main === require.cache[eval('__filename')]) {
|
if (require.main === require.cache[eval('__filename')]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user