This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
Update README.md #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
deploy: | |
# this will run when you have tagged a commit, starting with "v*" | |
# and requires that you have put your twine API key in your | |
# github secrets (see readme for details) | |
runs-on: ubuntu-latest | |
if: contains(github.ref, 'tags') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16.x" | |
registry-url: https://registry.npmjs.org | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine wheel | |
- name: Build and publish Python | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | |
run: | | |
pip install -e . # will build js deps | |
git tag | |
python -m build --outdir dist-python . | |
twine upload dist-python/* | |
- name: Build and publish to NPM | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm publish | |