diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..916dc07 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,81 @@ +name: CI-CD + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04] + node: [12] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Build + shell: bash + run: | + yarn + env: + NODE_OPTIONS: "--max_old_space_size=4096" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 + + publish: + needs: build + if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'theia-ide/timeline-chart' + + runs-on: ubuntu-latest + + strategy: + matrix: + node: [12] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + registry-url: 'https://registry.npmjs.org' + + - name: Pre-Publish + shell: bash + run: | + yarn + env: + NODE_OPTIONS: --max_old_space_size=4096 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 + + - name: Publish + uses: nick-invision/retry@v2 + with: + timeout_minutes: 5 + retry_wait_seconds: 60 + max_attempts: 3 + retry_on: error + command: yarn run publish:next + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8203288..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -sudo: required -language: node_js -node_js: '12' -git: - depth: 1 -cache: - yarn: true - directories: - - node_modules -branches: - only: - - master -install: -- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1 -- export PATH=$HOME/.yarn/bin:$PATH ; -script: -- yarn -before_deploy: -- printf "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}\n" >> ~/.npmrc -deploy: - provider: script - script: yarn run publish:next - skip_cleanup: true - on: - branch: master -env: - global: - - secure: bhMaDI9JuD5JarnIoG86lhEdtvI6Rk+CbNWZ7/vW9CZXp03Sw1sOCtmDvNEXsqO+nNsoRg/j7rZvEO8l7S4Pdh15O4v7RAb9av+j9IJ64ZUSynknYJCwatIkiXz8O7+Lt3vYWGJm0YwEv76IYPa/9cGq9BMVW5lsnS2pjmW6CWWgUaqdZsaNYUUoYzv/SBAyqXVKOii0mzUnemeGSB/DKXv/xePf8XMNnChwAUdH3sdaH3J7PBIMV4mfEtpdbTMGWT87LmA90EDTm0M2wJKndY1PvDTir7o7F4pd50qZE59fHM4FPpx+xENRAoGan5+6xbiG3NyoR3DKQNm4Sl6PBXdYoei1nBCX8wXI/r8o20W6MIjsSPfz4RQq1hsGPfH83WftfviDNKciArLVE1w+9oFsrw2tuZApmWMdaJN5NxswfpJFQ2EGA50qVd5bpYqAhUqIK5wwoOt3Mw5sioJBP0FLfmbM4EBF9Y0t+zXUWbMhJmASoB1zK0Cod2lvs3QWHHaW3okWIPkRkoW012Aw7I3s4ssaki0UtOMEpFsMkkCtJ4yz+ZT/QRJymDCWqEn9uHpkFJkCU3lkeTgq5qOUr11UcrMMfumRD4HSsHe6eRJy6rm2CV5o/qypkwHM88voaUN/nHMc5l2N2eKh0JprKkCKt1QvPgpJyMzACDCAHZI=