Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianOsipiuk committed Jun 10, 2021
1 parent 22a8e61 commit 9c43702
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 76 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: DamianOsipiuk
custom: paypal.me/DamianOsipiuk
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
commitlint:
runs-on: ubuntu-latest

name: "Lint commit message"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3

verify:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10, 12, 14, 16]

name: "Verify (Node ${{ matrix.node-version }})"
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
env:
CI: true

publish:
# publish only when merged in master on original repo, not on PR
if: github.repository == 'DamianOsipiuk/testrail-js-api' && github.ref == 'refs/heads/main'
needs: [verify, commitlint]
runs-on: ubuntu-latest

name: "Publish to NPM"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npx semantic-release@17 --branches main
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
31 changes: 0 additions & 31 deletions .github/workflows/nodejs.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/npmpublish.yml

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
},
"scripts": {
"build": "tsc",
"lint": "eslint ./src/** ./tests/**",
"prepare": "npm run build",
"lint": "eslint tests --ext .js,.ts",
"test": "jest"
},
"repository": {
Expand Down

0 comments on commit 9c43702

Please sign in to comment.