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

Prepare 3.13-compatible release #34

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
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
126 changes: 126 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Releases

on:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
generate-test-matrix:
name: Generate test matrix
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.get-folders.outputs.folders }}
steps:
- name: Check out code from Github
uses: actions/checkout@v4
- name: Get folders with tests
id: get-folders
run: |
pip install -U pip -r requirements_test.txt
FOLDERS=$(python scripts/helper.py list-test-folders --exclude distutils)
echo "folders: ${FOLDERS}"
echo "folders=${FOLDERS}" >> $GITHUB_OUTPUT

build:
name: Run build
runs-on: ubuntu-latest
needs: [generate-test-matrix]
strategy:
fail-fast: false
matrix:
folder: ${{ fromJson(needs.generate-test-matrix.outputs.folders) }}
version: ["3.13"]
steps:
- name: Check out code from Github
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
check-latest: true
- name: Run tests
run: |
cd ${{ matrix.folder }}
pip install build
python -m build
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.folder }}
path: ${{ matrix.folder }}/dist

publish-to-pypi:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [build]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
2 changes: 1 addition & 1 deletion aifc/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-aifc"
version = "3.12.2"
version = "3.13.0"
description = "Standard library aifc redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion asynchat/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-asynchat"
version = "3.11.9"
version = "3.13.0"
description = "Standard library asynchat redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion asyncore/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-asyncore"
version = "3.11.9"
version = "3.13.0"
description = "Standard library asyncore redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion cgi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-cgi"
version = "3.12.2"
version = "3.13.0"
description = "Standard library cgi redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion cgitb/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-cgitb"
version = "3.12.2"
version = "3.13.0"
description = "Standard library cgitb redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion chunk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-chunk"
version = "3.12.2"
version = "3.13.0"
description = "Standard library chunk redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion crypt/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-crypt"
version = "3.12.2"
version = "3.13.0"
description = "Standard library crypt redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion imghdr/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-imghdr"
version = "3.12.2"
version = "3.13.0"
description = "Standard library imghdr redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion mailcap/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-mailcap"
version = "3.12.2"
version = "3.13.0"
description = "Standard library mailcap redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion nntplib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-nntplib"
version = "3.12.2"
version = "3.13.0"
description = "Standard library nntplib redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion pipes/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-pipes"
version = "3.12.2"
version = "3.13.0"
description = "Standard library pipes redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion smtpd/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-smtpd"
version = "3.11.9"
version = "3.13.0"
description = "Standard library smtpd redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion sndhdr/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-sndhdr"
version = "3.12.2"
version = "3.13.0"
description = "Standard library sndhdr redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion sunau/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-sunau"
version = "3.12.2"
version = "3.13.0"
description = "Standard library sunau redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion telnetlib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-telnetlib"
version = "3.12.2"
version = "3.13.0"
description = "Standard library telnetlib redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion uu/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-uu"
version = "3.12.2"
version = "3.13.0"
description = "Standard library uu redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
2 changes: 1 addition & 1 deletion xdrlib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "standard-xdrlib"
version = "3.12.2"
version = "3.13.0"
description = "Standard library xdrlib redistribution. \"dead battery\"."
keywords = ["stdlib"]
authors = [
Expand Down
Loading