Skip to content

Commit

Permalink
build: use correct version in pypackage.toml and add dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Nov 20, 2023
1 parent 68ec709 commit 1f8557a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -41,7 +41,8 @@ jobs:
cp ipyvuetify/components.py ipyvuetify/components-previous.py
python -m ipyvuetify.components
diff ipyvuetify/components.py ipyvuetify/components-previous.py
- name: Package js
run: (cd js && npm pack)
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -105,9 +106,34 @@ jobs:
name: ipyvuetify-test-results
path: test-results

release-dry-run:
needs: [test]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: ipyvuetify-dist-${{ github.run_number }}

- name: Install node
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
# No --dry-run available for twine
# - name: Publish the Python package
- name: Publish the NPM package
run: |
cd js
echo $PRE_RELEASE
if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
npm publish --dry-run --tag ${TAG} --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}

release:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: [test]
needs: [release-dry-run]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ipyvuetify"
version = "3.0.0.dev0"
version = "3.0.0.alpha1"
description="Jupyter widgets based on vuetify UI components"
requires-python = ">=3.6"
dependencies = ["ipyvue==3.0.0.alpha1"]
Expand Down

0 comments on commit 1f8557a

Please sign in to comment.