From b274284eb8560d0cfd3992cef9d2fdc85c748111 Mon Sep 17 00:00:00 2001 From: Oksana Shadura Date: Mon, 4 Dec 2023 10:10:19 +0100 Subject: [PATCH] Try to imporve release GH action (borrowed from uproot5.git) --- .github/workflows/pypi-tag-deploy.yml | 37 ++++++++++++++++++++++----- MANIFEST.in | 11 +++++--- coffea_casa/_version.py | 4 +-- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pypi-tag-deploy.yml b/.github/workflows/pypi-tag-deploy.yml index 3d7113f4..17174b69 100644 --- a/.github/workflows/pypi-tag-deploy.yml +++ b/.github/workflows/pypi-tag-deploy.yml @@ -22,11 +22,34 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + + - name: Check MANIFEST + run: | + check-manifest --verbose + + - name: Build a wheel and a sdist run: | - python setup.py sdist - python setup.py bdist_wheel --universal - twine upload dist/* \ No newline at end of file + python -m build --outdir dist/ . + + - name: Verify the distribution + run: twine check dist/* + + - uses: actions/upload-artifact@v3 + with: + path: dist/* + + publish: + needs: [dist] + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} diff --git a/MANIFEST.in b/MANIFEST.in index 956f7469..a6470405 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,10 @@ +prune ** +graft coffea_casa +graft tests + include LICENSE include README.md +include pyproject.toml +include MANIFEST.in -include requirements.txt -include coffea_casa/*.py -include coffea_casa/*.yaml -include coffea_casa/_version.py +global-exclude __pycache__ *.py[cod] diff --git a/coffea_casa/_version.py b/coffea_casa/_version.py index 532fbfe5..3da98713 100644 --- a/coffea_casa/_version.py +++ b/coffea_casa/_version.py @@ -12,5 +12,5 @@ __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '2023.8.12.dev44+g2807d2c.d20231204' -__version_tuple__ = version_tuple = (2023, 8, 12, 'dev44', 'g2807d2c.d20231204') +__version__ = version = '2023.8.12.dev47+gb7c8cf5.d20231204' +__version_tuple__ = version_tuple = (2023, 8, 12, 'dev47', 'gb7c8cf5.d20231204')