-
-
Notifications
You must be signed in to change notification settings - Fork 5
85 lines (81 loc) · 3.47 KB
/
publish-to-npmjs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: GitHub CI - Publish to NPM
on:
workflow_dispatch:
release:
types:
- released
env:
access: public
alias: leanup
registry: https://registry.npmjs.org
tag: next
token: ${{ secrets.NPMJS_AUTH_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: '${{env.registry}}'
scope: '@${{env.alias}}'
- name: Clear npm cache
run: npm cache clean -f
- name: Install and publish only @${{env.alias}}/stack
run: |
rm package-lock.json
npm install --legacy-peer-deps
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/core
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-vite
run: |
rm package-lock.json
npm install --legacy-peer-deps
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/bundlers/vite
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-webpack
run: |
rm package-lock.json
npm install --legacy-peer-deps
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/bundlers/webpack
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/lib
run: |
rm package-lock.json
npm install --legacy-peer-deps
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/lib
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish only @${{env.alias}}/stack-plugin-babel
run: |
rm package-lock.json
npm install --legacy-peer-deps
npm publish --access=${{env.access}} --tag=${{env.tag}} || true
working-directory: packages/stack/plugins/babel
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Install and publish non @${{env.alias}}/lib, @${{env.alias}}/stack, @${{env.alias}}/stack-plugin-babel, @${{env.alias}}/stack-vite and @${{env.alias}}/stack-webpack
run: |
rm -rf packages/stack/core/dist packages/stack/webpack/dist
npx lerna@^5 exec --ignore @template/* --ignore @${{env.alias}}/lib --ignore @${{env.alias}}/stack --ignore @${{env.alias}}/stack-plugin-babel --ignore @${{env.alias}}/stack-vite --ignore @${{env.alias}}/stack-webpack --stream -- npm install --legacy-peer-deps
npx lerna@^5 exec --ignore @template/* --ignore @${{env.alias}}/lib --ignore @${{env.alias}}/stack --ignore @${{env.alias}}/stack-plugin-babel --ignore @${{env.alias}}/stack-vite --ignore @${{env.alias}}/stack-webpack --no-bail --stream -- npm publish --access=${{env.access}} --tag=${{env.tag}} || true
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Test all framework variants
run: |
rm ../.eslintrc.js
sh wake-up-all.sh ${{env.alias}} ${{env.tag}}
working-directory: scripts
env:
NODE_AUTH_TOKEN: ${{env.token}}