Skip to content

Commit

Permalink
Use Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 19, 2020
1 parent 5b50eac commit 88c862c
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ of code (9kB with GZip).

<!-- Definitions -->

[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

Expand Down

0 comments on commit 88c862c

Please sign in to comment.