repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run PR CI on all branches
[poolifier.git]
/
.github
/
workflows
/
npmpublish.yml
diff --git
a/.github/workflows/npmpublish.yml
b/.github/workflows/npmpublish.yml
index 0692856dc364fadb3529a0941f1efb318b1994c2..874d8a327048c29a3c9114a0227357ce6c205a08 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:
with:
- node-version: 12
- - run: npm ci
- - run: npm run lint
- - run: npm run test:prod
- - run: npm run coverage
+ node-version: 14
+
+ - 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,31
@@
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:
with:
- node-version: 1
2
+ node-version: 1
4
registry-url: https://registry.npmjs.org/
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 Release
+ if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
+ run: |
+ npm login
+ npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- - name: Publish
- run: npm publish
+ - name: Publish Beta
+ if: ${{ contains(steps.package-version.outputs.version, 'beta') }}
+ run: npm publish --tag beta
env:
env:
- NODE_AUTH_TOKEN: ${{secrets.
npm_token
}}
+ NODE_AUTH_TOKEN: ${{secrets.
NPM_TOKEN
}}