From 5d202c48c0753f34f3401bd0c451449d53cf1e6b Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 15 Oct 2020 17:11:55 +0200 Subject: [PATCH] chore(CI): add github actions workflow to replace travis (#1495) --- .github/workflows/push.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 000000000..80a6cca34 --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,41 @@ +name: Continuous Integration +on: push +jobs: + unit-tests: + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: + - ubuntu-20.04 + - macos-10.15 + node-version: + - 10.x + - 12.x + steps: + - uses: actions/checkout@v2 + - name: 'Install node.js ${{ matrix.node-version }}' + uses: actions/setup-node@v2-beta + with: + node-version: '${{ matrix.node-version }}' + - name: Run unit tests + run: | + npm install + npm run travis + npm-publish: + needs: unit-tests + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + runs-on: ubuntu-16.04 + steps: + - uses: actions/checkout@v2 + - name: Install node.js 12.x + uses: actions/setup-node@v2-beta + with: + node-version: 12.x + - name: Run semantic-release + env: + GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: > + curl + "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" + | bash -