diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..35d11be9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: vscroll build + +on: + push: + branches: + - "**" + pull_request: + branches: [ main ] + workflow_dispatch: + inputs: + cause: + description: 'Reason' + required: true + default: 'Manual triggering' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [12.x] + steps: + - name: Dispatched? + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + echo "This is dispatched" + echo "Build reason: ${{ github.event.inputs.cause }}" + + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - run: npm install + - run: npm test + - run: npm run build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 84e0eef9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js - -node_js: -- "stable" - -install: -- npm install - -cache: - directories: - - "node_modules" - -deploy: - provider: pages - skip_cleanup: true - github_token: $github_token - local_dir: demo - on: - branch: main diff --git a/package.json b/package.json index 9545ebd2..6489b828 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "watch": "jest --watch", "build": "node build", "test": "npm run lint && npm run jest", - "prepare": "npm run test && npm run build" + "prepublishOnly": "npm run test && npm run build" }, "dependencies": { "tslib": "^2.1.0"