diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7bf2b938 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: Node.js Build and Test + +on: + pull_request: + release: + types: [created] + +jobs: + build: + strategy: + matrix: + node-version: [14.x, 15.x] + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + - run: yarn test + - run: yarn lint + - run: yarn test-gen + - run: yarn test-gen-env + - run: yarn check diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml new file mode 100644 index 00000000..4efbcb5d --- /dev/null +++ b/.github/workflows/npm.yml @@ -0,0 +1,20 @@ +name: Deploy to NPM + +on: + push: + tags: + - '*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build Node.js 15.x + uses: actions/setup-node@v1 + with: + node-version: '15.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 58c45a58..00000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js -node_js: -- '15' -- '14' - -cache: - directories: - - node_modules - -script: -- yarn build -- yarn test -- yarn lint -- yarn test-gen -- yarn test-gen-env -- yarn check - -deploy: - provider: npm - email: $NPM_AUTH_EMAIL - api_key: $NPM_AUTH_TOKEN - on: - tags: true - node_js: '15' - skip_cleanup: true