Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'publish-pypi' workflow #581

Merged
merged 4 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflows will upload a Python Package when a release is created.
# For more information see:
# - https://docs.pypi.org/trusted-publishers/adding-a-publisher/
# - https://github.com/pypa/gh-action-pypi-publish

name: PyPI upload

on:
release:
types: [created]

jobs:
publish_pypi:
name: Publish package to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Build package
run: |
set -vxeuo pipefail
python -m pip install --upgrade pip

pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install .

pip install wheel setuptools
python setup.py sdist bdist_wheel

- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./dist/
35 changes: 0 additions & 35 deletions .github/workflows/python-publish.yml_

This file was deleted.

Loading