Skip to content

Commit 7b04aa9

Browse files
authored
Update main.yml
1 parent 2e92dcb commit 7b04aa9

File tree

1 file changed

+11
-36
lines changed

1 file changed

+11
-36
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,39 @@ name: CI/CD for Cool-Graph
33
on:
44
push:
55
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
6+
- main
107
release:
118
types: [published]
129

1310
jobs:
14-
build:
11+
publish:
1512
runs-on: ubuntu-latest
1613

1714
steps:
1815
- name: Check out code
19-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
2017

2118
- name: Set up Miniconda
2219
uses: conda-incubator/setup-miniconda@v2
2320
with:
2421
auto-activate-base: false
2522
python-version: 3.8
23+
environment-file: environment.yml
24+
activate-environment: cool-graph-env
2625

27-
- name: Create and activate environment
28-
shell: bash -l {0}
26+
- name: Install build tools and dependencies
2927
run: |
30-
conda env create --file environment.yml --name cool-graph-env
31-
echo "Environment created"
32-
echo "source $(conda info --base)/etc/profile.d/conda.sh" >> $GITHUB_ENV
33-
echo "conda activate cool-graph-env" >> $GITHUB_ENV
34-
35-
release:
36-
runs-on: ubuntu-latest
37-
needs: build
38-
39-
steps:
40-
- name: Check out code
41-
uses: actions/checkout@v2
42-
43-
- name: Set up Miniconda
44-
uses: conda-incubator/setup-miniconda@v2
45-
with:
46-
auto-activate-base: false
47-
python-version: 3.8
48-
49-
- name: Create and activate environment
50-
shell: bash -l {0}
51-
run: |
52-
conda env create --file environment.yml --name cool-graph-env
53-
echo "Environment created"
54-
echo "source $(conda info --base)/etc/profile.d/conda.sh" >> $GITHUB_ENV
55-
echo "conda activate cool-graph-env" >> $GITHUB_ENV
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
5632
5733
- name: Build and publish package
58-
shell: bash -l {0}
5934
env:
6035
TWINE_USERNAME: __token__
6136
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
6237
run: |
6338
source $(conda info --base)/etc/profile.d/conda.sh
6439
conda activate cool-graph-env
6540
python -m build
66-
python -m twine upload dist/*
41+
python -m twine upload dist/* --verbose

0 commit comments

Comments
 (0)