Add index.js
This commit is contained in:
parent
1db0828004
commit
ef8c6de171
32
index.js
Normal file
32
index.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
const core = require("@actions/core");
|
||||||
|
|
||||||
|
|
||||||
|
function parseVersion(str){
|
||||||
|
if (typeof(str) != 'string') { return false; }
|
||||||
|
|
||||||
|
var arr = str.split('.');
|
||||||
|
|
||||||
|
// parse int or default to 0
|
||||||
|
var maj = parseInt(arr[0]) || 0;
|
||||||
|
var min = parseInt(arr[1]) || 0;
|
||||||
|
var rest = parseInt(arr[2]) || 0;
|
||||||
|
return {
|
||||||
|
major: maj,
|
||||||
|
minor: min,
|
||||||
|
build: micro
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function increase_version_part(url, version, version_part) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function increase_version() {
|
||||||
|
url="https://dl.gitea.com/act_runner/{{VERSION}}/act_runner-{{VERSION}}-linux-arm-7"
|
||||||
|
version= "0.1.1"
|
||||||
|
minor = _increment_version_part(url, version, version_part="minor")
|
||||||
|
return str(_increment_version_part(url, minor, version_part="micro"))
|
||||||
|
}
|
||||||
|
|
||||||
|
increase_version()
|
Loading…
x
Reference in New Issue
Block a user