mirror of
https://github.com/diligencia/semantic-branch-version.git
synced 2024-11-23 13:03:51 +08:00
16 lines
367 B
JavaScript
16 lines
367 B
JavaScript
const core = require('@actions/core');
|
|
const execlib = require('@actions/exec');
|
|
|
|
try {
|
|
let output = '';
|
|
const options = {
|
|
listeners: {
|
|
stdout: (data) => output += data.toString()
|
|
}
|
|
};
|
|
|
|
execlib.exec('git', ['branch'], options)
|
|
core.setOutput("branchname", output);
|
|
} catch (error) {
|
|
core.setFailed(error.message);
|
|
} |