Skip to content

Commit

Permalink
ci: migrate to gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jul 26, 2021
1 parent 9cd135a commit c2ffaa8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install
run: npm install --no-package-lock
- name: Test
run: npm test
- name: Report
run: mkdir -p coverage && npx nyc report --reporter=text-lcov > coverage/lcov.info
- name: Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message, 'chore(release):') && !startsWith(github.event.head_commit.message, 'docs:') }}
shell: 'script -q -e -c "bash {0}"'
env:
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --global user.name ${{ secrets.GIT_USERNAME }}
npm run release
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@
"@commitlint/config-conventional": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
"coveralls": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"git-dirty": "latest",
"got": "latest",
"lint-staged": "latest",
"mocha": "latest",
"npm-check-updates": "latest",
Expand Down Expand Up @@ -88,8 +85,11 @@
"package.json": [
"finepack"
],
"*.js": [
"*.js,!*.min.js,": [
"prettier-standard"
],
"*.md": [
"standard-markdown"
]
},
"simple-git-hooks": {
Expand Down

0 comments on commit c2ffaa8

Please sign in to comment.