Skip to content

Commit

Permalink
attempting to add a new publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gwf committed Oct 3, 2023
1 parent 2264ea6 commit a477b95
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Python 🐍 distributions 📦 to PyPI

on: [push]

jobs:
build-n-publish:
name: Build and publish Python 🐍 dist 📦 to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install pep517
run: |
python -m pip install pep517 --user
- name: Build a binary wheel and a source tarball
run: |
python -m pep517.build --source --binary --out-dir dist/ .
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python -m unittest discover tests

0 comments on commit a477b95

Please sign in to comment.