diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index 2986720..0000000 --- a/.github/main.workflow +++ /dev/null @@ -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", - ] -} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b014ade --- /dev/null +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 21164cb..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -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