Skip to content

Commit 4ef8052

Browse files
authored
Update main.yml
1 parent 0874b3d commit 4ef8052

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: CI/CD for Cool-Graph
1+
name: Publish to PyPI
22

33
on:
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

Comments
 (0)