Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
timetoai authored Sep 1, 2023
1 parent d5208f5 commit a17f1a1
Showing 1 changed file with 18 additions and 23 deletions.
41 changes: 18 additions & 23 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,24 @@ permissions:
contents: read

jobs:
build:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install poetry
shell: bash
run: |
curl -sSL https://install.python-poetry.org | python3 -
python -m pip install poetry-dynamic-versioning[plugin]
- name: Set poetry path variable
run: echo "/Users/runner/.local/bin" >> $GITHUB_PATH

- name: Build
run: |
poetry build
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
run: |
poetry publish --username "${{ secrets.PYPI_USER }}" --password "${{ secrets.PYPI_PASSWORD }}"
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: ${{ secrets.PYPI_USER }}
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a17f1a1

Please sign in to comment.