From 88c862cc35a565c7c669af208e143e0638fb26d9 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 19 Nov 2020 10:17:15 +0100 Subject: [PATCH] Use Actions --- .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 15 ----------- readme.md | 4 +-- 3 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c239c92 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +name: main +on: + - pull_request + - push +jobs: + main: + name: ${{matrix.node}} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: ${{matrix.node}} + - run: npm install + - run: npm test + - uses: codecov/codecov-action@v1 + strategy: + matrix: + node: + - lts/dubnium + - node + release: + if: startsWith(github.ref, 'refs/tags/') + name: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: node + - run: npm install + - run: npm run build + - id: release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + tag_name: ${{github.ref}} + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + upload_url: ${{steps.release.outputs.upload_url}} + asset_path: lowlight.js + asset_name: lowlight.js + asset_content_type: application/javascript + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + upload_url: ${{steps.release.outputs.upload_url}} + asset_path: lowlight.min.js + asset_name: lowlight.min.js + asset_content_type: application/javascript diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0cf5181..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - lts/dubnium - - node -after_script: bash <(curl -s https://codecov.io/bash) -deploy: - provider: releases - skip_cleanup: true - api_key: - secure: R5v85JY57PIp9rx9uqMOrO5xiZ6s8cFa/4otdL0hFSvREZCyQ6YpQzubLN2XBra49fzRQF11PWsw0p5ZHApYJ+QhGjlaz50d1UC72dHmvvGGRDZRQA4QKeSC5uCwlzUrmVeQLvAsHwE8LxBdLD7DbskFHh2rtb4eeJQVYLEZ4bjU2KNE8bgmwCv/48gbvcLAWoCbURqStSaQgppKcd3hzpHgKFI6IBatTk8631An7VlxwsaAxgAqaKXC7YnXOKMk8cecfReNfRk4oGQEEuxyAlEM5Zkt7Z+xmlGLEpvWMzSsdtlXe4PQom3N6QMix+xihlkRyY0e9/dQXswe3eF9GE11sn5GkOgC5VrpFnOtqOH+0niAsHe9/BD3Y4UGyM22qa8i2Ag4VZvxmxeWX+vK76cGW/iGv3Dn5CI+booahUhjkFMGGredp4spbLlsbqKwZVuCA/J1/BB4sm9IATJArynWbwAG+ySjaOE+NqjAsIu7AVmtcBXpslg0FNV85VZvsXra8S6VF3S84ctTWwf+tnM4+iR9Raf3sO2I0PELQs3H7yptNvxG4ghncfCQ3M+tGPhRQ0g3DcFdOh6XkvQ3oDqK9Ea5uG2cFPQTwYZd6Qc+vSPw+hNsnGdOTBozn05iWI17Anw9yith08S2Je4fZdE5njcEqxgBFW6X60hwMN4= - file: - - 'lowlight.js' - - 'lowlight.min.js' - on: - tags: true diff --git a/readme.md b/readme.md index eaa8d5a..30bb953 100644 --- a/readme.md +++ b/readme.md @@ -288,9 +288,9 @@ of code (9kB with GZip). -[build-badge]: https://img.shields.io/travis/wooorm/lowlight.svg +[build-badge]: https://github.com/wooorm/lowlight/workflows/main/badge.svg -[build]: https://travis-ci.org/wooorm/lowlight +[build]: https://github.com/wooorm/lowlight/actions [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/lowlight.svg