Skip to content

Commit

Permalink
Update workflow for pypi 2FA.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleaoman committed Nov 13, 2023
1 parent 1eafcd6 commit 7dfa8b4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,28 @@ on:
workflow_dispatch:

jobs:
deploy:

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/swiftgalaxy
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
pip install setuptools wheel build
pip install -r requirements.txt
pip install .
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build
run: |
pyproject-build
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7dfa8b4

Please sign in to comment.