Skip to content

Commit 6e55a8b

Browse files
authored
Merge pull request #81 from ecmwf/feature/cd-pypi
Add pypi CD
2 parents bba6c1d + ff7e7a7 commit 6e55a8b

File tree

2 files changed

+18
-42
lines changed

2 files changed

+18
-42
lines changed

Diff for: .github/workflows/cd.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: cd
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
8+
jobs:
9+
pypi:
10+
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
11+
secrets: inherit

Diff for: .github/workflows/check-and-publish.yml

+7-42
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
platform: [ubuntu-latest, macos-latest, windows-latest]
30-
python-version: ["3.8", "3.9", "3.10", "3.11"]
31-
method: ["conda", "ecmwflibs"]
30+
python-version: ['3.8', '3.9', '3.10', '3.11']
31+
method: ['conda', 'ecmwflibs']
3232
exclude:
3333
- platform: macos-latest
34-
python-version: "3.9"
35-
method: "ecmwflibs"
34+
python-version: '3.9'
35+
method: 'ecmwflibs'
3636

3737
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }} (${{ matrix.method }})
3838
runs-on: ${{ matrix.platform }}
@@ -79,8 +79,8 @@ jobs:
7979
- run: pytest
8080
if: matrix.method == 'conda' && matrix.platform == 'windows-latest'
8181
env:
82-
ECCODES_DEFINITION_PATH: "C:/Miniconda/Library/share/eccodes/definitions"
83-
ECCODES_SAMPLES_PATH: "C:/Miniconda/Library/share/eccodes/samples"
82+
ECCODES_DEFINITION_PATH: 'C:/Miniconda/Library/share/eccodes/definitions'
83+
ECCODES_SAMPLES_PATH: 'C:/Miniconda/Library/share/eccodes/samples'
8484

8585
- run: pytest
8686
if: matrix.method != 'conda' || matrix.platform != 'windows-latest'
@@ -89,39 +89,4 @@ jobs:
8989

9090
- name: Upload coverage to Codecov
9191
uses: codecov/codecov-action@v1
92-
if: "false"
93-
94-
deploy:
95-
if: ${{ github.event_name == 'release' }}
96-
97-
name: Upload to Pypi
98-
needs: checks
99-
100-
runs-on: ubuntu-latest
101-
102-
steps:
103-
- uses: actions/checkout@v3
104-
105-
- name: Set up Python
106-
uses: actions/setup-python@v4
107-
with:
108-
python-version: "3.x"
109-
110-
- name: Install dependencies
111-
run: |
112-
python -m pip install --upgrade pip
113-
pip install setuptools wheel twine
114-
115-
- name: Check version
116-
run: |
117-
release=${GITHUB_REF##*/}
118-
version=$(python setup.py --version)
119-
test "$release" == "$version"
120-
121-
- name: Build and publish
122-
env:
123-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
124-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
125-
run: |
126-
python setup.py sdist
127-
twine upload dist/*
92+
if: 'false'

0 commit comments

Comments
 (0)