repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: v2.4.0-0
[poolifier.git]
/
.github
/
workflows
/
npmpublish.yml
diff --git
a/.github/workflows/npmpublish.yml
b/.github/workflows/npmpublish.yml
index 31b02ef4c6e2016e8e88b6daaf4d3e2292b84a42..cf68a7ae1abd64f5be3c9db4691e7384c2d03800 100644
(file)
--- a/
.github/workflows/npmpublish.yml
+++ b/
.github/workflows/npmpublish.yml
@@
-10,35
+10,65
@@
jobs:
steps:
- name: Checkout
steps:
- name: Checkout
- uses: actions/checkout@v
1
+ uses: actions/checkout@v
3
- name: Setup Node
- name: Setup Node
- uses: actions/setup-node@v
1
+ uses: actions/setup-node@v
3
with:
with:
- node-version: 12
- - run: npm ci
- - run: npm run lint
- - run: npm run test
- - run: npm run coverage
+ node-version: '18.x'
- publish-npm:
+ - name: Install
+ run: |
+ corepack enable
+ corepack prepare pnpm@latest --activate
+ pnpm install
+
+ - name: Tests & Coverage
+ run: |
+ pnpm run test
+ pnpm run coverage
+
+ - name: Lint
+ run: pnpm run lint
+
+ - name: Production Build
+ run: pnpm run build:prod
+
+ publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v
1
+ uses: actions/checkout@v
3
- name: Setup Node
- name: Setup Node
- uses: actions/setup-node@v
1
+ uses: actions/setup-node@v
3
with:
with:
- node-version:
12
+ node-version:
'18.x'
registry-url: https://registry.npmjs.org/
registry-url: https://registry.npmjs.org/
+ - name: Read package.json version
+ id: package-version
+ uses: jaywcjlove/github-action-package@main
+
- name: Install
- name: Install
- run: npm ci --production
+ run: pnpm install
+
+ - name: Publish Release
+ if: ${{ contains(steps.package-version.outputs.version, '-') == false }}
+ run: pnpm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- - name: Publish
- run: npm publish
+ - name: Publish Pre-Release
+ if: ${{ contains(steps.package-version.outputs.version, '-') == true }}
+ run: pnpm publish --tag next
env:
env:
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ # - name: Publish Beta Release
+ # if: ${{ contains(steps.package-version.outputs.version, 'beta') == true }}
+ # run: pnpm publish --tag beta
+ # env:
+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}