Skip to content

Commit

Permalink
ci: Remove distribution options to enable default build v0.5.0 behavi…
Browse files Browse the repository at this point in the history
…or (#93)

* Remove `--sdist --wheel` from the build CLI options to enable default behavior for build v0.5.0+
   - By default, a source distribution (sdist) is built from {srcdir} and a binary distribution (wheel) is built from the sdist. This is recommended as it will ensure the sdist can be used to build wheels.
   - c.f. https://pypa-build.readthedocs.io/en/stable/changelog.html
* Add pip list to workflow to spot check versions installed
* Update to pypa/gh-action-pypi-publish@v1.4.2
  • Loading branch information
matthewfeickert authored Jun 19, 2021
1 parent d35bb32 commit 0f8af18
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install build check-manifest twine
python -m pip list
- name: Check MANIFEST
run: |
check-manifest
- name: Build a binary wheel and a source tarball
- name: Build a sdist and a wheel
run: |
python -m build --sdist --wheel --outdir dist/ .
python -m build --outdir dist/ .
- name: Verify history available for dev versions
run: |
wheel_name=$(find dist/ -iname "*.whl" -printf "%f\n")
Expand All @@ -47,12 +48,12 @@ jobs:
- name: Publish distribution 📦 to Test PyPI
# every PR will trigger a push event on master, so check the push event is actually coming from master
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'scikit-hep/pylhe'
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'scikit-hep/pylhe'
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.pypi_password }}

0 comments on commit 0f8af18

Please sign in to comment.