Skip to content

Commit 9f90e17

Browse files
committed
CI/CD update
1 parent 7b50d7d commit 9f90e17

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

.github/workflows/ci-main.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,15 @@ jobs:
2828
name: Build wheels
2929
needs:
3030
- test
31-
runs-on: ${{ matrix.platform.image }}
31+
runs-on: ${{ matrix.platform }}
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
platform:
36-
- image: 'windows-latest'
37-
name: 'windows'
38-
- image: 'ubuntu-latest'
39-
name: 'linux'
35+
platform: [ 'windows-latest', 'ubuntu-latest' ]
4036
python-version: [ 'cp38', 'cp39', 'cp310', 'cp311', 'cp312' ]
4137
timeout-minutes: 35
4238
env:
4339
CONAN_REVISIONS_ENABLED: 1
44-
TARGET_ID: libcosimpy-${{ github.ref_name }}-${{ matrix.platform.name }}-${{ matrix.python-version }}
4540
steps:
4641
- uses: actions/checkout@v3
4742
- uses: actions/setup-python@v5
@@ -51,26 +46,31 @@ jobs:
5146
uses: pypa/cibuildwheel@v2.19.2
5247
env:
5348
CIBW_BUILD: "${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64"
49+
- name: Twine check
50+
run: |
51+
pip install twine
52+
twine check --strict ./wheelhouse/*
5453
- uses: actions/upload-artifact@v4
5554
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
5655
name: Upload artifact (wheels)
5756
with:
58-
name: ${{ env.TARGET_ID }}-wheel
57+
name: libcosimpy-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.python-version }}-wheel
5958
path: ./wheelhouse/*.whl
6059

6160
build_source:
6261
name: Build source
6362
needs:
6463
- test
6564
runs-on: 'ubuntu-latest'
66-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
6765
steps:
6866
- uses: actions/checkout@v3
69-
- name: Install build
70-
run: pip install build
7167
- name: Build source
72-
run: python -m build --sdist
68+
run: |
69+
pip install build twine
70+
python -m build --sdist
71+
twine check --strict ./dist/*
7372
- uses: actions/upload-artifact@v4
73+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
7474
name: Upload artifact (source)
7575
with:
7676
name: libcosimpy-${{ github.ref_name }}-source
@@ -88,10 +88,6 @@ jobs:
8888
pattern: "*-wheel"
8989
merge-multiple: true
9090
path: ./dist/
91-
- name: Twine check
92-
run: |
93-
pip install twine
94-
twine check --strict ./dist/*
9591
- uses: pypa/gh-action-pypi-publish@v1.9.0
9692
with:
9793
user: __token__

0 commit comments

Comments
 (0)