From c67242afc59cf6533061823a5df9336c8963860b Mon Sep 17 00:00:00 2001 From: dpopes Date: Thu, 10 Oct 2024 18:05:30 -0700 Subject: [PATCH 1/2] Create github action to upload to pypi --- .github/workflows/pypi.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..5fc50c2 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,44 @@ +name: pypi + +on: + push: + tags: + - v* + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - env: py38 + py: '3.8' + - env: py39 + py: '3.9' + - env: py310 + py: '3.10' + - env: py311 + py: '3.11' + - env: pypy3.9 + py: 'pypy-3.9' + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.py }} + - run: pip install tox + - run: tox -e ${{ matrix.env }} + pypi: + needs: test + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: python setup.py sdist + - uses: pypa/gh-action-pypi-publish@v1.10.3 From 10926b559ab4292e5112a6d7b8939bf4fe778f87 Mon Sep 17 00:00:00 2001 From: dpopes Date: Thu, 10 Oct 2024 18:06:40 -0700 Subject: [PATCH 2/2] s/master/main --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 5fc50c2..fda87ff 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -5,7 +5,7 @@ on: tags: - v* branches: - - master + - main jobs: test: