Skip to content

Commit 89b6355

Browse files
build: use correct version in pypackage.toml and add dry-run
1 parent 68ec709 commit 89b6355

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -41,7 +38,8 @@ jobs:
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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ipyvuetify"
7-
version = "3.0.0.dev0"
7+
version = "3.0.0.alpha1"
88
description="Jupyter widgets based on vuetify UI components"
99
requires-python = ">=3.6"
1010
dependencies = ["ipyvue==3.0.0.alpha1"]

0 commit comments

Comments
 (0)