Skip to content

Commit

Permalink
GHA: Update deploy_pypi.yml
Browse files Browse the repository at this point in the history
Set up for trusted publishing.
  • Loading branch information
dweindl committed Oct 9, 2024
1 parent a8b40bf commit a7682dc
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy package to PyPI

on:
release:
Expand All @@ -7,30 +7,29 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']
environment:
name: pypi
url: https://pypi.org/p/fiddy
permissions:
id-token: write

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Prepare python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.12"

- name: Check out repository
uses: actions/checkout@v4

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools wheel build
- name: Build distribution package
run: |
python setup.py sdist bdist_wheel
python -m build -s
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit a7682dc

Please sign in to comment.