Skip to content

Commit 6402903

Browse files
committed
Address review comments
1 parent 4baf81c commit 6402903

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/reusable-build/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ runs:
1818
with:
1919
name: ml-metadata-wheel-py${{ inputs.python-version }}
2020
path: dist/*.whl
21+
if-no-files-found: error

.github/workflows/build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Build struct2tensor wheels
22

33
on:
44
pull_request:
5-
workflow_dispatch:
65
release:
76
types: [published]
87

@@ -34,19 +33,21 @@ jobs:
3433
# Pin transitive dependency on pkginfo until https://github.com/pypa/twine/issues/1070 is
3534
# fixed
3635
pip install twine pkginfo>=1.10.0
37-
${{ matrix.ls || 'ls -lh' }} dist/
36+
ls -lh dist/
3837
twine check dist/*
3938
4039
upload_to_pypi:
4140
name: Upload to PyPI
4241
runs-on: ubuntu-latest
43-
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
42+
if: (github.event_name == 'release' && github.event.action == 'published' || (github.event_name == 'workflow_dispatch')
4443
needs: [build]
4544
environment:
4645
name: pypi
4746
url: https://pypi.org/p/struct2tensor/
4847
permissions:
4948
id-token: write
49+
contents: read
50+
attestations: write
5051
steps:
5152
- name: Retrieve wheels
5253
uses: actions/download-artifact@v4
@@ -58,6 +59,11 @@ jobs:
5859
run: |
5960
ls -lAs wheels/
6061
62+
- name: Generate artifact attestations for wheels
63+
uses: actions/attest-build-provenance@v1
64+
with:
65+
subject-path: "wheels/*"
66+
6167
- name: Upload to PyPI
6268
uses: pypa/gh-action-pypi-publish@release/v1
6369
with:

0 commit comments

Comments
 (0)