Skip to content

Commit

Permalink
feat: Add publishing to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyager committed Sep 8, 2023
1 parent 617259f commit 3a3854a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: PyPi Release

on:
release:
types: [published]

jobs:
release:
environment: Release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
strategy:
fail-fast: false
matrix:
python-version: [3.11]
poetry-version: [1.4.2]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Install poetry ${{ matrix.poetry-version }}
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==${{ matrix.poetry-version }}
- name: Install dependencies
shell: bash
run: python -m poetry install

- name: Build
run: |
python -m poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

# - name: Publish
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
# run: |
# python -m poetry publish --skip-existing

0 comments on commit 3a3854a

Please sign in to comment.