diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..fddbc38 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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/gh-action-sigstore-python@v3.0.0 + 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 }}' \ No newline at end of file diff --git a/aifc/pyproject.toml b/aifc/pyproject.toml index 4915903..b926ab9 100644 --- a/aifc/pyproject.toml +++ b/aifc/pyproject.toml @@ -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 = [ diff --git a/asynchat/pyproject.toml b/asynchat/pyproject.toml index ba6f3b4..92270f1 100644 --- a/asynchat/pyproject.toml +++ b/asynchat/pyproject.toml @@ -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 = [ diff --git a/asyncore/pyproject.toml b/asyncore/pyproject.toml index 71f274a..d456a14 100644 --- a/asyncore/pyproject.toml +++ b/asyncore/pyproject.toml @@ -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 = [ diff --git a/cgi/pyproject.toml b/cgi/pyproject.toml index 25d3c74..d4c3a20 100644 --- a/cgi/pyproject.toml +++ b/cgi/pyproject.toml @@ -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 = [ diff --git a/cgitb/pyproject.toml b/cgitb/pyproject.toml index 6e10caa..9a67315 100644 --- a/cgitb/pyproject.toml +++ b/cgitb/pyproject.toml @@ -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 = [ diff --git a/chunk/pyproject.toml b/chunk/pyproject.toml index c512a8f..76e9133 100644 --- a/chunk/pyproject.toml +++ b/chunk/pyproject.toml @@ -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 = [ diff --git a/crypt/pyproject.toml b/crypt/pyproject.toml index 7ffd82c..925a4e2 100644 --- a/crypt/pyproject.toml +++ b/crypt/pyproject.toml @@ -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 = [ diff --git a/imghdr/pyproject.toml b/imghdr/pyproject.toml index 33cf732..e4bf585 100644 --- a/imghdr/pyproject.toml +++ b/imghdr/pyproject.toml @@ -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 = [ diff --git a/mailcap/pyproject.toml b/mailcap/pyproject.toml index 2ad54ae..521be58 100644 --- a/mailcap/pyproject.toml +++ b/mailcap/pyproject.toml @@ -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 = [ diff --git a/nntplib/pyproject.toml b/nntplib/pyproject.toml index d4b87e4..53bb6d5 100644 --- a/nntplib/pyproject.toml +++ b/nntplib/pyproject.toml @@ -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 = [ diff --git a/pipes/pyproject.toml b/pipes/pyproject.toml index 2a5da00..f577bce 100644 --- a/pipes/pyproject.toml +++ b/pipes/pyproject.toml @@ -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 = [ diff --git a/smtpd/pyproject.toml b/smtpd/pyproject.toml index 81c4259..963126f 100644 --- a/smtpd/pyproject.toml +++ b/smtpd/pyproject.toml @@ -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 = [ diff --git a/sndhdr/pyproject.toml b/sndhdr/pyproject.toml index d23a820..6da1d0e 100644 --- a/sndhdr/pyproject.toml +++ b/sndhdr/pyproject.toml @@ -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 = [ diff --git a/sunau/pyproject.toml b/sunau/pyproject.toml index 8190655..da3c5ed 100644 --- a/sunau/pyproject.toml +++ b/sunau/pyproject.toml @@ -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 = [ diff --git a/telnetlib/pyproject.toml b/telnetlib/pyproject.toml index 82a415d..a20b56c 100644 --- a/telnetlib/pyproject.toml +++ b/telnetlib/pyproject.toml @@ -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 = [ diff --git a/uu/pyproject.toml b/uu/pyproject.toml index 853652e..eb43633 100644 --- a/uu/pyproject.toml +++ b/uu/pyproject.toml @@ -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 = [ diff --git a/xdrlib/pyproject.toml b/xdrlib/pyproject.toml index 8c13abe..f07627e 100644 --- a/xdrlib/pyproject.toml +++ b/xdrlib/pyproject.toml @@ -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 = [