Skip to content

Commit

Permalink
Revert "add trusted publishing for PyPI"
Browse files Browse the repository at this point in the history
This reverts commit 20aeef4.
  • Loading branch information
natestemen committed Jun 26, 2024
1 parent 20aeef4 commit 12b520f
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
inputs: {}

jobs:
build:
name: Build Mitiq distribution
deploy:
if: github.repository_owner == 'unitaryfund'
runs-on: ubuntu-latest
steps:
Expand All @@ -23,32 +22,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies for build
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build mitiq
run: python -m build
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: dist/*

publish:
name: Upload release to PyPi
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/mitiq/
permissions:
id-token: write
steps:
- name: Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: dist/
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
make install requirements
pip install setuptools wheel twine
- 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/*

0 comments on commit 12b520f

Please sign in to comment.