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
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
workflow_dispatch:
push:
tags:
- "*.*.*"

name: release

permissions:
contents: read

jobs:
build:
name: Build distributions for PyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0

- name: Install build dependencies
run: python -m pip install uv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinning all actions but then running pip install uv is a bit inconsistent. How about we use https://github.com/astral-sh/setup-uv here with a fixed uv version?


- name: Build distributions
run: python -m uv build

- name: Upload distributions
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: pyopenssl-dists
path: dist/

pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs:
- build

permissions:
# Used to authenticate to PyPI via OIDC.
id-token: write

steps:
- name: fetch dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: pyopenssl-dists
path: dist/

- name: publish
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
with:
attestations: true