Skip to content

Corrfunc-2.5.2

Corrfunc-2.5.2 #1

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package to PyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Create source distribution
run: python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
with:
user: __token__
password: ${{ secrets.PyPI_Publish }}
- name: Install package from PyPI
run: python -m pip install Corrfunc==${{ github.event.release.tag_name }}
- name: Verify installed version
run: |
export corrfunc_version=`python -c "import Corrfunc; print(Corrfunc.__version__)"`
echo "Installed Corrfunc version = ${corrfunc_version}"
echo "GitHub Release name = ${{ github.event.release.tag_name }}"
if [[ "$corrfunc_version" != "${{ github.event.release.tag_name }}" ]]; exit 1; fi