Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit token scope in example #156

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,29 @@ To also upload to PyPI:

```yaml
jobs:
check-publish-package:
name: Build, inspect, and upload our package to PyPI.
build-package:
name: Build and inspect package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2
id: build


upload-to-pypi:
name: Upload prebuilt package to PyPI
needs: build-package
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing, but
# should NOT be granted anywhere else!
id-token: write

steps:
- name: Download built artifact to dist/
uses: actions/download-artifact@v4
with:
name: ${{ steps.build.outputs.artifact-name }}
name: Packages
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
```
Expand Down
Loading