Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 31b8e8e

Browse files
author
Franck Royer
committed
Add npm check and release
1 parent 2e7cbad commit 31b8e8e

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,17 @@ jobs:
9090

9191
- name: Run e2e tests
9292
run: make e2e_scripts
93+
npm_build:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v1
97+
- name: Use Node.js 10.x
98+
uses: actions/setup-node@v1
99+
with:
100+
node-version: 10.x
101+
- name: yarn install and test
102+
run: |
103+
cd .npm
104+
yarn install
105+
yarn list
106+
yarn test

.github/workflows/release-bin.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,24 @@ jobs:
4343
files: create-comit-app_*.tar.gz
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
npm_build:
47+
runs-on: ubuntu-latest
48+
needs: build # Do not publish if the build failed
49+
steps:
50+
- uses: actions/checkout@v1
51+
- name: Use Node.js 10.x
52+
uses: actions/setup-node@v1
53+
with:
54+
node-version: 10.x
55+
- name: Build
56+
run: |
57+
cd .npm
58+
yarn install
59+
yarn list
60+
- name: Release on NPM
61+
if: startsWith(github.ref, 'refs/tags/')
62+
run: |
63+
cd .npm
64+
yarn publish
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npm/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "cca.js",
66
"scripts": {
77
"start": "node cca.js",
8-
"fix": "prettier --write '**/*.{ts,js,json,yml}'"
8+
"fix": "prettier --write '**/*.{ts,js,json,yml}'",
9+
"test": "prettier --check '**/*.{ts,js,json,yml}'"
910
},
1011
"repository": {
1112
"type": "git",

0 commit comments

Comments
 (0)