Skip to content

Commit

Permalink
Switch to trusted publishing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Apr 12, 2024
1 parent f04b00d commit ece4caf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
environment: release
steps:
- uses: actions/checkout@master
- uses: actions/checkout@4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pip install --upgrade setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Upload deploy
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET }}
run: python -m twine upload dist/*
- name: Install pypa/build
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit ece4caf

Please sign in to comment.