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

Commit 9e9c121

Browse files
bors[bot]Franck Royer
andauthored
Merge #244
244: Add npm check and release r=D4nte a=D4nte Resolves #198 Co-authored-by: Franck Royer <franck@coblox.tech>
2 parents 3e9334b + 36664c9 commit 9e9c121

File tree

3 files changed

+38
-1
lines changed

3 files changed

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