Skip to content
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
45 changes: 45 additions & 0 deletions .github/workflows/pypipublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish Python

on:
release:
types: [published]

jobs:
tests:
name: run tests
uses: ./.github/workflows/unittest.yml
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
needs: [tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TEST_KEY }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_KEY }}
3 changes: 1 addition & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Python package

on:
pull_request:
on: [workflow_call, pull_request]

jobs:
build:
Expand Down