Skip to content

Commit

Permalink
feat: publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
sesh committed Dec 5, 2023
1 parent e0b12b8 commit d6102b4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Publish Package

on:
release:
types: [created]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install tld beautifulsoup4
- name: Test with unittest
run: |
python -m unittest discover test
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [test]
environment:
name: pypi
url: https://pypi.org/p/ready-check
permissions:
id-token: write

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install test dependencies
run: |
pip install -e '.'
- name: Install publishing dependencies
run: |
pip install setuptools wheel twine build
- name: Build python package
run: |
python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
name = ready
name = ready-check
version = 1.1.0
author = Brenton Cleeland
author_email = [email protected]
Expand All @@ -18,3 +18,4 @@ python_requires = >=3.9
install_requires =
thttp
tld
beautifulsoup4

0 comments on commit d6102b4

Please sign in to comment.