Skip to content

Commit

Permalink
Merge pull request marinebon#18 from ayushanand18/pypi-setup
Browse files Browse the repository at this point in the history
adds pypi workflow file
  • Loading branch information
7yl4r authored Jun 6, 2023
2 parents 708e050 + 1a0a236 commit a568100
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
shell: bash

- name: Install build tools
run: |
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
shell: bash

- name: Build binary wheel
run: python -m build --sdist --wheel . --outdir dist

- name: CheckFiles
run: |
ls dist
shell: bash

- name: Test wheels
run: |
cd dist && python -m pip install pydwcviz*.whl
python -m twine check *
shell: bash

- name: Publish a Python distribution to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a568100

Please sign in to comment.