Skip to content

Commit c2b046e

Browse files
committed
Fix github workflow
1 parent bf33eae commit c2b046e

4 files changed

Lines changed: 716 additions & 14 deletions

File tree

.github/workflows/publish-on-pypi.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ on:
77

88
jobs:
99
build:
10-
strategy:
11-
matrix:
12-
python_package_dir: [ 'src/python' ]
13-
1410
name: Build distribution 📦
1511
runs-on: ubuntu-latest
1612
defaults:
1713
run:
18-
working-directory: ${{ matrix.python_package_dir }}
14+
working-directory: ./src/python
1915

2016
if: github.event_name == 'push' || github.event_name == 'release'
2117

@@ -39,7 +35,7 @@ jobs:
3935
uses: actions/upload-artifact@v4
4036
with:
4137
name: python-package-distributions
42-
path: dist/
38+
path: src/python/dist/
4339

4440
publish-to-pypi:
4541
name: >-
@@ -57,16 +53,18 @@ jobs:
5753

5854
defaults:
5955
run:
60-
working-directory: ${{ matrix.python_package_dir }}
56+
working-directory: ./src/python
6157

6258
steps:
6359
- name: Download all the dists
6460
uses: actions/download-artifact@v4
6561
with:
6662
name: python-package-distributions
67-
path: dist/
63+
path: src/python/dist/
6864
- name: Publish distribution 📦 to PyPI
6965
uses: pypa/gh-action-pypi-publish@release/v1
66+
with:
67+
packages-dir: ./src/python/dist/
7068

7169
github-release:
7270
name: >-
@@ -77,9 +75,10 @@ jobs:
7775
runs-on: ubuntu-latest
7876

7977
if: github.event_name == 'release'
78+
8079
defaults:
8180
run:
82-
working-directory: ${{ matrix.python_package_dir }}
81+
working-directory: ./src/python
8382

8483
permissions:
8584
contents: write # IMPORTANT: mandatory for making GitHub Releases
@@ -90,13 +89,13 @@ jobs:
9089
uses: actions/download-artifact@v4
9190
with:
9291
name: python-package-distributions
93-
path: dist/
92+
path: src/python/dist/
9493
- name: Sign the dists with Sigstore
9594
uses: sigstore/gh-action-sigstore-python@v3.0.0
9695
with:
9796
inputs: >-
98-
./dist/*.tar.gz
99-
./dist/*.whl
97+
./src/python/dist/*.tar.gz
98+
./src/python/dist/*.whl
10099
- name: Upload artifact signatures to GitHub Release
101100
env:
102101
GITHUB_TOKEN: ${{ github.token }}
@@ -105,5 +104,5 @@ jobs:
105104
# sigstore-produced signatures and certificates.
106105
run: >-
107106
gh release upload
108-
'${{ github.ref_name }}' dist/**
107+
'${{ github.ref_name }}' src/python/dist/**
109108
--repo '${{ github.repository }}'

0 commit comments

Comments
 (0)