diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e6905b6..5b32a2e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -21,12 +21,9 @@ jobs: # needs: [test] steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: "3.11" + - name: Update package list + run: | + sudo apt-get update - name: Install git run: | @@ -37,17 +34,23 @@ jobs: with: submodules: 'recursive' - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3 - python -m pip install --upgrade pip - pip install --upgrade pip h5py setuptools wheel build + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" - - name: Publish to PyPI + - name: Prepare Python environment run: | python -m venv venv . ./venv/bin/activate + pip install --upgrade pip h5py setuptools wheel build + + - name: Install dependencies + run: | + sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3 + + - name: Publish to PyPI + run: | pip install -U twine build python -m build . python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*