1- name : CI/CD for Cool-Graph
1+ name : Publish to PyPI
22
33on :
4- push :
5- branches :
6- - main
74 release :
85 types : [published]
96
@@ -15,27 +12,21 @@ jobs:
1512 - name : Check out code
1613 uses : actions/checkout@v3
1714
18- - name : Set up Miniconda
19- uses : conda-incubator /setup-miniconda@v2
15+ - name : Set up Python
16+ uses : actions /setup-python@v4
2017 with :
21- auto-activate-base : false
22- python-version : 3.8
23- environment-file : environment.yml
24- activate-environment : cool-graph-env
18+ python-version : ' 3.8'
2519
26- - name : Install build tools and dependencies
20+ - name : Install build dependencies
2721 run : |
28- source $(conda info --base)/etc/profile.d/conda.sh
29- conda activate cool-graph-env
30- python -m pip install --upgrade pip setuptools wheel
31- python -m pip install build twine
22+ python -m pip install --upgrade pip
23+ python -m pip install build
3224
33- - name : Build and publish package
34- env :
35- TWINE_USERNAME : __token__
36- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
25+ - name : Build package
3726 run : |
38- source $(conda info --base)/etc/profile.d/conda.sh
39- conda activate cool-graph-env
4027 python -m build
41- python -m twine upload --repository-url https://pypi.org/project/cool-graph/ dist/*
28+
29+ - name : Publish to PyPI
30+ uses : pypa/gh-action-pypi-publish@release/v1
31+ with :
32+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments