@@ -25,13 +25,10 @@ jobs:
2525 - uses : actions/setup-node@v3
2626 with :
2727 node-version : 18.x
28- - name : install build
29- run : python -m pip install build
30-
3128 - name : Install dependencies
3229 run : |
3330 python -m pip install --upgrade pip
34- pip install "reacton[generate]" ipyvue
31+ pip install "reacton[generate]" ipyvue "jupyterlab<4" build
3532
3633 - name : build wheel
3734 run : python -m build
4138 cp ipyvuetify/components.py ipyvuetify/components-previous.py
4239 python -m ipyvuetify.components
4340 diff ipyvuetify/components.py ipyvuetify/components-previous.py
44-
41+ - name : Package js
42+ run : (cd js && npm pack)
4543 - name : Upload build artifacts
4644 uses : actions/upload-artifact@v3
4745 with :
@@ -105,9 +103,34 @@ jobs:
105103 name : ipyvuetify-test-results
106104 path : test-results
107105
106+ release-dry-run :
107+ needs : [test]
108+ runs-on : ubuntu-20.04
109+ steps :
110+ - uses : actions/download-artifact@v3
111+ with :
112+ name : ipyvuetify-dist-${{ github.run_number }}
113+
114+ - name : Install node
115+ uses : actions/setup-node@v3
116+ with :
117+ node-version : " 18.x"
118+ registry-url : " https://registry.npmjs.org"
119+ # No --dry-run available for twine
120+ # - name: Publish the Python package
121+ - name : Publish the NPM package
122+ run : |
123+ cd js
124+ echo $PRE_RELEASE
125+ if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
126+ npm publish --dry-run --tag ${TAG} --access public *.tgz
127+ env :
128+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
129+ PRE_RELEASE : ${{ github.event.release.prerelease }}
130+
108131 release :
109132 if : startsWith(github.event.ref, 'refs/tags/v')
110- needs : [test ]
133+ needs : [release-dry-run ]
111134 runs-on : ubuntu-20.04
112135 steps :
113136 - uses : actions/download-artifact@v3
0 commit comments