repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc enhancement
[poolifier.git]
/
.github
/
workflows
/
npmpublish.yml
diff --git
a/.github/workflows/npmpublish.yml
b/.github/workflows/npmpublish.yml
index 31b02ef4c6e2016e8e88b6daaf4d3e2292b84a42..c62f0b540b0782b9932ac49967a9b645034941d1 100644
(file)
--- a/
.github/workflows/npmpublish.yml
+++ b/
.github/workflows/npmpublish.yml
@@
-10,16
+10,28
@@
jobs:
steps:
- name: Checkout
steps:
- name: Checkout
- uses: actions/checkout@v
1
+ uses: actions/checkout@v
2
- name: Setup Node
- name: Setup Node
- uses: actions/setup-node@v
1
+ uses: actions/setup-node@v
2
with:
node-version: 12
with:
node-version: 12
- - run: npm ci
- - run: npm run lint
- - run: npm run test
- - run: npm run coverage
+
+ - name: Install
+ run: npm ci
+
+ - name: Production Build
+ run: npm run build:prod
+
+ - name: Lint
+ run: npm run lint
+
+ - name: Production Tests & Coverage
+ run: |
+ npm run test:prod
+ npm run coverage
+ env:
+ CI: true
publish-npm:
needs: build
publish-npm:
needs: build
@@
-27,18
+39,29
@@
jobs:
steps:
- name: Checkout
steps:
- name: Checkout
- uses: actions/checkout@v
1
+ uses: actions/checkout@v
2
- name: Setup Node
- name: Setup Node
- uses: actions/setup-node@v
1
+ uses: actions/setup-node@v
2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
with:
node-version: 12
registry-url: https://registry.npmjs.org/
+ - name: Read package.json version
+ uses: tyankatsu0105/read-package-version-actions@v1
+ id: package-version
+
- name: Install
- name: Install
- run: npm ci
--production
+ run: npm ci
- - name: Publish
+ - name: Publish Release
+ if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
+
+ - name: Publish Beta
+ if: ${{ contains(steps.package-version.outputs.version, 'beta') }}
+ run: npm publish --tag beta
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}