mirror of
https://github.com/diligencia/semantic-branch-version.git
synced 2024-11-23 16:53:51 +08:00
Add then action for promise
This commit is contained in:
parent
13f46ab513
commit
ac9e9d46b0
8
index.js
8
index.js
@ -2,12 +2,8 @@ const core = require('@actions/core');
|
|||||||
const execlib = require('@actions/exec');
|
const execlib = require('@actions/exec');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const branchName = getBranchName();
|
getBranchName()
|
||||||
core.setOutput("branchname", branchName);
|
.then(name => core.setOutput("branchname", name));
|
||||||
|
|
||||||
if (branchName) {
|
|
||||||
console.log('We got it! : ' + branchName);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user