Skip to content

Commit ec4fd94

Browse files
authored
Automatic upload to pypi (#11)
* improving tests + fixing bugs + adding data folder * fix double quote issue in PM * removed julia 1.3.0 * improve coverage * add pypi deployment * rename build to ci * rename
1 parent 8bb3eba commit ec4fd94

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish on PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
# After vMajor.Minor.Patch _anything_ is allowed (without "/") !
7+
- v[0-9]+.[0-9]+.[0-9]+*
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'pzarabadip/aiida-porousmaterials' && startsWith(github.ref, 'refs/tags/v')
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Python 3.7
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: 3.7
22+
23+
- name: Upgrade setuptools and install package
24+
run: |
25+
python -m pip install --upgrade pip setuptools
26+
python -m pip install -e .
27+
- name: Assert package version
28+
env:
29+
TAG_VERSION: ${{ github.ref }}
30+
run: python ./.github/check_version.py
31+
32+
- name: Build source distribution
33+
run: python ./setup.py sdist
34+
35+
- name: Publish package to PyPI
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)