Skip to content

Commit

Permalink
trying to fix the publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zulko authored Nov 20, 2024
1 parent 70b146a commit 8e2cf5b
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,30 @@ permissions:
contents: read

jobs:
deploy:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install setuptools wheel build
- name: Build
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x # Adjust the Python version as needed

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build the package
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*

0 comments on commit 8e2cf5b

Please sign in to comment.