Skip to content

Commit

Permalink
Merge pull request #1047 from pypa/new-release
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
sigmavirus24 authored Feb 11, 2024
2 parents fe1885f + 09d993a commit 94f810c
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 9 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Publish to PyPI

on:
push:
tags:
- "*"

permissions:
contents: read

jobs:
build:
name: "Build dists"
runs-on: "ubuntu-latest"
environment:
name: "publish"
outputs:
hashes: ${{ steps.hash.outputs.hashes }}

steps:
- name: "Checkout repository"
uses: "actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3"

- name: "Setup Python"
uses: "actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b"
with:
python-version: "3.x"

- name: "Install dependencies"
run: python -m pip install build

- name: "Build dists"
run: |
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \
python -m build
- name: "Generate hashes"
id: hash
run: |
cd dist && echo "::set-output name=hashes::$(sha256sum * | base64 -w0)"
- name: "Upload dists"
uses: "actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce"
with:
name: "dist"
path: "dist/"
if-no-files-found: error
retention-days: 5

provenance:
needs: [build]
permissions:
actions: read
contents: write
id-token: write # Needed to access the workflow's OIDC identity.
uses: "slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0"
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
upload-assets: true
compile-generator: true # Workaround for https://github.com/slsa-framework/slsa-github-generator/issues/1163

publish:
name: "Publish to PyPI"
if: startsWith(github.ref, 'refs/tags/')
needs: ["build", "provenance"]
permissions:
contents: write
id-token: write
runs-on: "ubuntu-latest"

steps:
- name: "Download dists"
uses: "actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a"
with:
name: "dist"
path: "dist/"

- name: "Publish dists to PyPI"
uses: "pypa/gh-action-pypi-publish@48b317d84d5f59668bb13be49d1697e36b3ad009"
1 change: 0 additions & 1 deletion changelog/931.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion changelog/991.misc.rst

This file was deleted.

19 changes: 17 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Changelog
=========

This project follows the `semantic versioning <https://packaging.python.org/guides/distributing-packages-using-setuptools/#semantic-versioning-preferred>`_
and `pre-release versioning <https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning>`_
This project follows the `semantic versioning <https://packaging.python.org/en/latest/discussions/versioning/#semantic-versioning-vs-calendar-versioning>`_
and `pre-release versioning <https://packaging.python.org/en/latest/discussions/versioning/>`_
schemes recommended by the Python Packaging Authority.

.. Do *NOT* add changelog entries here!
Expand All @@ -12,6 +12,21 @@ schemes recommended by the Python Packaging Authority.
.. towncrier release notes start
Twine 5.0.0 (2024-02-10)
------------------------

Bugfixes
^^^^^^^^

- Use ``email.message`` instead of ``cgi`` as ``cgi`` has been deprecated (`#969 <https://github.com/pypa/twine/issues/969>`_)


Misc
^^^^

- `#931 <https://github.com/pypa/twine/issues/931>`_, `#991 <https://github.com/pypa/twine/issues/991>`_, `#1028 <https://github.com/pypa/twine/issues/1028>`_, `#1040 <https://github.com/pypa/twine/issues/1040>`_


Twine 4.0.2 (2022-11-30)
------------------------

Expand Down
12 changes: 8 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,19 @@
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'

# See https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_ignore
linkcheck_ignore = [
"http://127.0.0.1*",
r"https?://127\.0\.0\.1.*",
# Avoid errors due to GitHub rate limit
# https://github.com/sphinx-doc/sphinx/issues/7388
"https://github.com/pypa/twine/issues/*",
r"https://github\.com/pypa/twine/issues/.*",
# Avoid errors from channels interpreted as anchors
"https://web.libera.chat/#",
r"https://web\.libera\.chat/#",
# Avoid error from InvalidPyPIUploadURL docstring
"https://upload.pypi.org/legacy",
r"https://upload\.pypi\.org/legacy/?",
# Avoid errors from 403/Login Redirects
r"https://(test\.)?pypi\.org/manage/project/twine/collaboration/?",
r"https://pypi\.org/manage/project/twine/collaboration/?",
]

intersphinx_mapping = {
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand Down
1 change: 1 addition & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Settings class and module."""

# Copyright 2018 Ian Stapleton Cordasco
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The contents of this package are not a public API. For more details, see
https://github.com/pypa/twine/issues/194 and https://github.com/pypa/twine/issues/665.
"""

# Copyright 2018 Donald Stufft and individual contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The contents of this package are not a public API. For more details, see
https://github.com/pypa/twine/issues/194 and https://github.com/pypa/twine/issues/665.
"""

# Copyright 2013 Donald Stufft
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/commands/check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for ``twine check``."""

# Copyright 2018 Dustin Ingram
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/commands/register.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for ``twine register``."""

# Copyright 2015 Ian Cordasco
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/commands/upload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for ``twine upload``."""

# Copyright 2013 Donald Stufft
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing exceptions raised by twine."""

# Copyright 2015 Ian Stapleton Cordasco
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions twine/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing logic for handling settings."""

# Copyright 2018 Ian Stapleton Cordasco
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 94f810c

Please sign in to comment.