ci(github): remove workflow before deprecation and improve current

This commit is contained in:
Sergio Herrera Guzmán 2019-09-11 13:39:31 +02:00
parent 2890e5a27e
commit 7853ec2acb
3 changed files with 28 additions and 95 deletions

67
.github/main.workflow vendored
View File

@ -1,67 +0,0 @@
################################################
# Workflow for a github release when a tag is
# pushed
################################################
workflow "github release" {
resolves = [
"release.github",
"release.lint",
]
on = "push"
}
action "release.filter" {
uses = "actions/bin/filter@master"
args = "tag v*"
}
action "release.install" {
uses = "docker://node:10"
needs = ["release.filter"]
args = "yarn install"
}
action "release.build" {
uses = "docker://node:10"
needs = ["release.install"]
args = "yarn run build"
}
action "release.lint" {
uses = "docker://node:10"
needs = ["release.install"]
args = "yarn run lint"
}
action "release.test" {
uses = "docker://node:10"
needs = ["release.build"]
args = "yarn run test"
}
action "release.auth" {
needs = ["release.test"]
uses = "actions/bin/filter@master"
args = ["actor", "octocat", "torvalds"]
}
action "release.npm.publish" {
needs = ["release.auth"]
uses = "docker://node:10"
args = "sh scripts/publish.sh"
secrets = [
"REGISTRY_AUTH_TOKEN",
]
env = {
REGISTRY_URL = "registry.npmjs.org"
}
}
action "release.github" {
needs = ["release.npm.publish"]
uses = "docker://node:10"
args = "sh scripts/github-release.sh"
secrets = [
"GITHUB_TOKEN",
]
}

28
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: CI
on: push
jobs:
build_test_lint:
name: Node ${{ matrix.node_version }} and ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: ['8.16', 10, 12] # Node 8 version fix due to https://github.com/actions/setup-node/issues/27
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node_version }}
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Lint
run: yarn lint

View File

@ -1,28 +0,0 @@
name: Node CI
on: [push]
jobs:
ci:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [8, 10, 12]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node_version }}
- name: Use Yarn 1.17.2
run: |
npm install -g yarn@1.17.2
- name: yarn build
run: |
yarn install
yarn lint
yarn build