Skip to content

Commit 7b956bc

Browse files
author
Manu
committed
feat: Publish wheels
1 parent 71a5f79 commit 7b956bc

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

.github/workflows/sqlguard-ci.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ jobs:
7777
platform:
7878
- runner: ubuntu-24.04
7979
target: x86_64
80-
- runner: ubuntu-24.04
81-
target: x86
82-
- runner: ubuntu-24.04
83-
target: aarch64
84-
- runner: ubuntu-24.04
85-
target: armv7
8680
steps:
8781
- name: Checkout code
8882
uses: actions/checkout@v4
@@ -96,24 +90,41 @@ jobs:
9690
- name: Upload wheels
9791
uses: actions/upload-artifact@v4
9892
with:
99-
name: wheels-linux-${{ matrix.platform.target }}
93+
name: wheels-sqlguard-${{ matrix.platform.target }}
10094
path: dist
10195
publish-sqlguard:
10296
needs:
10397
- build-sqlguard-sdist
10498
- build-sqlguard-wheels
105-
if: startsWith(github.ref, 'refs/tags/')
99+
strategy:
100+
matrix:
101+
platform:
102+
- runner: ubuntu-24.04
103+
target: x86_64
106104
runs-on: ubuntu-latest
107105
permissions:
108106
# IMPORTANT: this permission is mandatory for Trusted Publishing
109107
id-token: write
110108
# Needed for fetching the code
111109
contents: read
112110
steps:
113-
- name: Download Artifacts
111+
- name: Download Artifacts Sdist
114112
uses: actions/download-artifact@v4
115113
with:
116-
name: sqlguard-dist
114+
name: sqlguard-sdist
117115
path: dist
118-
- name: Publish package distributions to PyPI
116+
- name: Download Artifacts Wheels
117+
uses: actions/download-artifact@v4
118+
with:
119+
name: wheels-sqlguard-${{ matrix.platform.target }}
120+
path: dist
121+
- name: Publish package distributions to TEST PyPI
122+
if: "!startsWith(github.ref, 'refs/tags/')"
123+
uses: pypa/gh-action-pypi-publish@release/v1
124+
with:
125+
repository-url: https://test.pypi.org/legacy/
126+
skip-existing: true
127+
# verbose: true
128+
- name: Publish package distributions to PyPI Official (Tags Only)
129+
if: startsWith(github.ref, 'refs/tags/')
119130
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)