-
Notifications
You must be signed in to change notification settings - Fork 18
43 lines (35 loc) · 1.21 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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