Skip to content

Commit 90fde27

Browse files
committed
added ci to published release to pypi
1 parent 375e63d commit 90fde27

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/publish-pypi.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and upload to PyPI
2+
3+
# Only build on tagged releases
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
build:
11+
name: Build and upload sdist
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
activate-environment: csep-dev
22+
python-version: '3.10'
23+
channels: conda-forge
24+
25+
- name: Install dependencies
26+
run: |
27+
conda env update --file requirements.yml
28+
conda info -a
29+
conda list
30+
31+
- name: Create sdist
32+
run: |
33+
python setup.py check
34+
python setup.py sdist
35+
36+
- name: Publish Package
37+
uses: pypa/gh-action-pypi-publish@master
38+
with:
39+
user: __token__
40+
password: ${{ secrets.pypi_upload_token }}

0 commit comments

Comments
 (0)