Skip to content
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
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ on:
workflow_dispatch:

jobs:
build-and-publish:
build:
if: github.repository_owner == 'pypa'
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -29,6 +28,25 @@ jobs:
run: pip install -U setuptools wheel build calver
- name: Build
run: python -m build .
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
if-no-files-found: error
publish:
if: github.repository_owner == 'pypa'
needs: build
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
release:
Expand Down
Loading