Skip to content

Commit

Permalink
created pypi-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
alxkp committed Jan 29, 2023
1 parent 5b9223b commit 26c796d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PyPi Publish Workflow
on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: python:3.8
secrets:
PYPI_PASSWORD:
required: true

jobs:
publish:
runs-on: ubuntu-latest
container:
image: python:${{ inputs.pythonVersion }}
needs: test
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Verify tag
run: |-
GIT_TAG=${GITHUB_REF/refs\/tags\//}
LIBRARY_VERSION=$(poetry version -s)
if [[ "$GIT_TAG" != LIBRARY_VERSION ]]; then exit 1; fi
- name: Build
run: poetry build
- name: Publish
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 26c796d

Please sign in to comment.