Skip to content

Commit

Permalink
ci: fix npm release
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Feb 26, 2024
1 parent 33176c3 commit ec3236b
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "reacton[generate]" ipyvue
pip install "reacton[generate]" ipyvue "jupyterlab~=3.0"
- name: build wheel
run: python -m build
Expand All @@ -44,6 +44,10 @@ jobs:
python -m ipyvuetify.components
diff ipyvuetify/components.py ipyvuetify/components-previous.py
- name: Package js
run: (cd js && npm pack)
- name: show files
run: find .
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -142,3 +146,46 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}

check_release:
# if: startsWith(github.event.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
with:
name: ipyvuetify-dist-${{ github.run_number }}

- name: Show files
run: find .
- name: Install node
uses: actions/setup-node@v1
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org"

# - name: Install Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.8

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install twine wheel jupyter-packaging jupyterlab

# - name: Publish the Python package
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# run: twine upload --skip-existing dist/*

- 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 --access public *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
PRE_RELEASE: ${{ github.event.release.prerelease }}

0 comments on commit ec3236b

Please sign in to comment.