Skip to content

Commit

Permalink
ci: add automate releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Aug 21, 2021
1 parent 3af76d8 commit 36a0d1a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
@@ -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
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -38,10 +38,8 @@
"ava": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
"coveralls": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"git-dirty": "latest",
"iltorb": "latest",
"lint-staged": "latest",
"npm-check-updates": "latest",
Expand All @@ -61,7 +59,6 @@
"scripts": {
"clean": "rm -rf node_modules",
"contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "standard-markdown README.md && standard",
"postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
"prerelease": "npm run update:check && npm run contributors",
Expand Down

0 comments on commit 36a0d1a

Please sign in to comment.