feat: cli and release workflow

This commit is contained in:
Mikeal Rogers 2019-01-26 22:03:51 +00:00
parent 6e839006c1
commit 8103c061c3
3 changed files with 65 additions and 0 deletions

38
.github/main.workflow vendored Normal file
View File

@ -0,0 +1,38 @@
workflow "Build and Publish" {
on = "push"
resolves = "Docker Publish"
}
action "Shell Lint" {
uses = "actions/bin/shellcheck@master"
args = "entrypoint.sh"
}
action "Docker Lint" {
uses = "docker://replicated/dockerfilelint"
args = ["Dockerfile"]
}
action "Build" {
needs = ["Shell Lint", "Docker Lint"]
uses = "actions/docker/cli@master"
args = "build -t npm ."
}
action "Docker Tag" {
needs = ["Build"]
uses = "actions/docker/tag@master"
args = "npm github/npm --no-latest"
}
action "Publish Filter" {
needs = ["Build"]
uses = "actions/bin/filter@master"
args = "branch master"
}
action "NPM Publish" {
needs = "Publish Filter" {
uses = "mikeal/auto-release@master"
secrets = ["NPM_AUTH_TOKEN"]
}

1
cli.js Normal file
View File

@ -0,0 +1 @@
console.log(process.env)

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "auto-release",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"bin": {
"auto-release": "./cli.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mikeal/auto-release.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/mikeal/auto-release/issues"
},
"homepage": "https://github.com/mikeal/auto-release#readme",
"dependencies": {
"yargs": "^12.0.5"
}
}