Skip to content

Commit

Permalink
updates for pypi release #2
Browse files Browse the repository at this point in the history
  • Loading branch information
stuchalk committed Jan 3, 2023
1 parent ecd6f73 commit b392035
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package to PyPI

env:
PYTHON_MAIN_VERSION: 3.10
POETRY_VERSION: 1.2.2

on:
release:
types: [published]

jobs:
deploy:
name: Test on ${{ matrix.os}}
runs-on: ${{ matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install poetry==${{ env.POETRY_VERSION }}
poetry install
- name: Build Python package and Upload to TestPyPi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry update
poetry build
poetry publish -r testpypi --username "__token__" --password $PYPI_TOKEN

0 comments on commit b392035

Please sign in to comment.