Skip to content

Commit

Permalink
Update PyPI publish with 2FA (#107)
Browse files Browse the repository at this point in the history
* remove user/pass

* Update CHANGELOG.rst

* Update CHANGELOG.rst
  • Loading branch information
patricktnast committed Jan 9, 2024
1 parent ec19501 commit 62a9cad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -17,18 +19,15 @@ jobs:
run: |
python --version
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools wheel build
- name: Test
run: |
pip install .[test]
pytest --runslow ./tests
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
- name: Send mail
# Notify when cron job fails
if: failure()
Expand All @@ -48,4 +47,4 @@ jobs:
to: uw_ihme_simulationscience@uw.edu
# from email name
from: Vivarium Notifications


4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**3.1.2 - 01/09/24**

- Update PyPI to 2FA with trusted publisher (GitHub Actions)

**3.1.1 - 07/13/23**

- Changes version metadata to use setuptools_scm
Expand Down

0 comments on commit 62a9cad

Please sign in to comment.