Skip to content

Commit

Permalink
feat(PyPI): release package to PyPI as CD
Browse files Browse the repository at this point in the history
FIX #20
  • Loading branch information
sbancal committed Jan 26, 2023
1 parent c3099cb commit a963c75
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release-to-pypi

on:
push:
branches:
- main
tags:
- 'refs/tags/v*'

jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v3

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

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.poetry/bin:$PATH"' >> $GITHUB_ENV
source $GITHUB_ENV
- name: Install dependencies
run: |
poetry install
pip install wheel setuptools
- name: Build package
run: make package

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a963c75

Please sign in to comment.