mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-13 11:51:37 +02:00
feat(manifest): add manifest-pr command (#280)
This commit is contained in:
9
index.js
9
index.js
@@ -3,7 +3,7 @@ const { factory } = require('release-please/build/src')
|
||||
|
||||
const CONFIG_FILE = 'release-please-config.json'
|
||||
const MANIFEST_FILE = '.release-please-manifest.json'
|
||||
const MANIFEST_COMMAND = 'manifest'
|
||||
const MANIFEST_COMMANDS = ['manifest', 'manifest-pr']
|
||||
const RELEASE_LABEL = 'autorelease: pending'
|
||||
const GITHUB_RELEASE_COMMAND = 'github-release'
|
||||
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
|
||||
@@ -34,13 +34,14 @@ function getManifestInput () {
|
||||
}
|
||||
}
|
||||
|
||||
async function runManifest () {
|
||||
async function runManifest (command) {
|
||||
const githubOpts = getGitHubInput()
|
||||
const manifestOpts = { ...githubOpts, ...getManifestInput() }
|
||||
const pr = await factory.runCommand('manifest-pr', manifestOpts)
|
||||
if (pr) {
|
||||
core.setOutput('pr', pr)
|
||||
}
|
||||
if (command === 'manifest-pr') return
|
||||
|
||||
const releasesCreated = await factory.runCommand('manifest-release', manifestOpts)
|
||||
if (releasesCreated) {
|
||||
@@ -58,8 +59,8 @@ async function runManifest () {
|
||||
|
||||
async function main () {
|
||||
const command = core.getInput('command') || undefined
|
||||
if (command === MANIFEST_COMMAND) {
|
||||
return await runManifest()
|
||||
if (MANIFEST_COMMANDS.includes(command)) {
|
||||
return await runManifest(command)
|
||||
}
|
||||
|
||||
const { token, fork, defaultBranch, apiUrl, repoUrl } = getGitHubInput()
|
||||
|
||||
Reference in New Issue
Block a user