Skip to content

Commit ddcdb43

Browse files
committed
Use Actions
1 parent 4d69ceb commit ddcdb43

File tree

3 files changed

+56
-17
lines changed

3 files changed

+56
-17
lines changed

.github/workflows/main.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: main
2+
on:
3+
- pull_request
4+
- push
5+
jobs:
6+
main:
7+
name: '${{ matrix.node }}'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: dcodeIO/setup-node-nvm@master
12+
with:
13+
node-version: ${{ matrix.node }}
14+
- run: npm install
15+
- run: npm test
16+
- uses: codecov/codecov-action@v1
17+
strategy:
18+
matrix:
19+
node:
20+
- lts/dubnium
21+
- node
22+
release:
23+
if: startsWith(github.ref, 'refs/tags/')
24+
name: release
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: dcodeIO/setup-node-nvm@master
29+
with:
30+
node-version: node
31+
- run: npm install
32+
- run: npm run build
33+
- id: release
34+
uses: actions/create-release@v1
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
tag_name: ${{ github.ref }}
39+
- uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
upload_url: ${{ steps.release.outputs.upload_url }}
44+
asset_path: hast-util-sanitize.js
45+
asset_name: hast-util-sanitize.js
46+
asset_content_type: application/javascript
47+
- uses: actions/upload-release-asset@v1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
upload_url: ${{ steps.release.outputs.upload_url }}
52+
asset_path: hast-util-sanitize.min.js
53+
asset_name: hast-util-sanitize.min.js
54+
asset_content_type: application/javascript

.travis.yml

-15
This file was deleted.

readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ abide by its terms.
324324

325325
<!-- Definitions -->
326326

327-
[build-badge]: https://img.shields.io/travis/syntax-tree/hast-util-sanitize.svg
327+
[build-badge]: https://github.com/syntax-tree/hast-util-sanitize/workflows/main/badge.svg
328328

329-
[build]: https://travis-ci.org/syntax-tree/hast-util-sanitize
329+
[build]: https://github.com/syntax-tree/hast-util-sanitize/actions
330330

331331
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-sanitize.svg
332332

0 commit comments

Comments
 (0)