Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
feat(release-please): use latest release please version (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaticivan committed Feb 12, 2021
1 parent b7fac39 commit 484099d
Show file tree
Hide file tree
Showing 4 changed files with 705 additions and 852 deletions.
13 changes: 8 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const core = require('@actions/core')
const { GitHubRelease } = require('release-please/build/src/github-release')
const { ReleasePRFactory } = require('release-please/build/src/release-pr-factory')
const { ReleasePR } = require('release-please/build/src/release-pr')

const RELEASE_LABEL = 'autorelease: pending'

Expand Down Expand Up @@ -51,7 +51,9 @@ async function main () {
// Next we check for PRs merged since the last release, and groom the
// release PR:
if (!command || command === 'release-pr') {
const release = releasePlease.getReleasePRFactory().buildStatic(releaseType, {
const GithubReleasePR = releasePlease.getReleasePR()
const release = new GithubReleasePR({
releaseType,
monorepoTags,
packageName,
path,
Expand All @@ -65,6 +67,7 @@ async function main () {
versionFile,
defaultBranch
})

const pr = await release.run()
if (pr) {
core.setOutput('pr', pr)
Expand All @@ -76,14 +79,14 @@ function getGitHubRelease () {
return GitHubRelease
}

function getReleasePRFactory () {
return ReleasePRFactory
function getReleasePR () {
return ReleasePR
}

const releasePlease = {
main,
getGitHubRelease,
getReleasePRFactory
getReleasePR
}

if (require.main === module) {
Expand Down

0 comments on commit 484099d

Please sign in to comment.