v3.12 #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
Upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
- name: Build wheel and source tarball | |
id: build_tarball | |
run: | | |
python -m pip install "setuptools>=50.0" "wheel" | |
python setup.py sdist | |
version=$(head -1 cosmosis/version.py | cut -d "'" -f 2) | |
sha=$(shasum -a 256 dist/cosmosis-${version}.tar.gz | awk '{print $1}') | |
echo "pypi-version=${version}" >> $GITHUB_OUTPUT | |
echo "tarball-sha=${sha}" >> $GITHUB_OUTPUT | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_COSMOSIS_UPLOAD }} | |
- name: Make PR on cosmosis conda forge feedstock | |
uses: joezuntz/conda-forge-feedstock-pr-action@v2.1 | |
with: | |
feedstock_name: cosmosis | |
token: ${{ secrets.PR_MAKER_TOKEN }} | |
version: ${{ steps.build_tarball.outputs.pypi-version }} | |
hash: ${{ steps.build_tarball.outputs.tarball-sha }} | |
fork_owner: joezuntz | |
email_address: joezuntz@googlemail.com |