Skip to content

Commit

Permalink
chore(semantic-release): added semantic-release (#27)
Browse files Browse the repository at this point in the history
* chore(semantic-release): added semantic-release

* chore(test): update test
  • Loading branch information
jmenast authored Jun 5, 2020
1 parent e7cc1bd commit 9b8caae
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 120 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Node.js CI

on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.14.1"
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- name: eslint
run: npx eslint .
- name: test
run: npm test
env:
CI: true
release:
if: github.ref == 'refs/heads/master'
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.14.1"
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
145 changes: 26 additions & 119 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "tsc",
"format": "prettier-standard 'lib/**/*.ts'",
"lint": "eslint 'lib/**/*.ts' --fix",
"test": "cd test && npm run test",
"test": "echo \"Nothing found tests.\"",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
"locallyTest": "tsc test.ts && node test.js"
Expand Down Expand Up @@ -42,6 +42,7 @@
"@commitlint/cli": "8.3.5",
"@commitlint/config-conventional": "8.3.4",
"@eclass/eslint-config": "1.3.1",
"@eclass/semantic-release-npm-github-config": "3.0.1",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"@types/node": "12.12.44",
Expand Down

0 comments on commit 9b8caae

Please sign in to comment.