Skip to content

Commit

Permalink
Merge release/1.2.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 30, 2020
2 parents a48290f + e7cff3e commit 8444c7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ If you're using `release branch` or `hotfix branch` of [gitflow-workflow](https:
### develop branch name. default: develop (optional).
develop_branch: 'dev'

### main branch name. default: master (optional).
main_branch: 'main'

### tag name which tagged to master.(optional)
### ex. v1.1.0
tag: v${{ steps.extract_tag.outputs.tag }}
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
develop_branch:
description: 'develop branch name'
default: 'develop'
main_branch:
description: 'main branch name'
default: 'master'
tag:
description: 'tag name'
runs:
Expand Down
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3531,11 +3531,13 @@ function run() {
const branch = core.getInput('branch');
core.info(`branch name=${branch}`);
let newMasterSha = '';
const mainBranch = core.getInput('main_branch');
core.info(`main branch name=${mainBranch}`);
try {
newMasterSha = yield merge(branch, 'master');
newMasterSha = yield merge(branch, mainBranch);
}
catch (error) {
core.setFailed(`master merge failed::${error.message}`);
core.setFailed(`${mainBranch} merge failed::${error.message}`);
}
const tag = core.getInput('tag');
if (tag) {
Expand Down
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ async function run(): Promise<void> {
core.info(`branch name=${branch}`)

let newMasterSha = ''
const mainBranch: string = core.getInput('main_branch')
core.info(`main branch name=${mainBranch}`)
try {
newMasterSha = await merge(branch, 'master')
newMasterSha = await merge(branch, mainBranch)
} catch (error) {
core.setFailed(`master merge failed::${error.message}`)
core.setFailed(`${mainBranch} merge failed::${error.message}`)
}

const tag: string = core.getInput('tag')
Expand Down

0 comments on commit 8444c7c

Please sign in to comment.