Workflow file for this run
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 to PyPI and Github Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Yarn | |
run: npm install --global yarn | |
- name: Build Extension in Dev Mode | |
run: | | |
pip install -e . | |
- name: Build Wheel | |
run: | | |
python -m pip install --upgrade build && | |
python -m build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xircuits-wheel | |
path: dist | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} | |
run: | | |
pip install twine | |
twine upload dist/* | |
- name: Publish to GitHub Releases | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |