From e0c7fd6723bd63db4183352d21dfbebd6c2553b1 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 8 Aug 2022 11:06:34 +0200 Subject: [PATCH] Prepare v0.3.0.rc1 with new release workflow (#3) --- .github/workflows/main.yml | 5 ++-- .github/workflows/pypi.yml | 57 ++++++++++++++++++++++++++++++++++++++ CHANGES.txt | 9 ++++-- pyasn1_modules/__init__.py | 2 +- 4 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e38ecf..81bfcb9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,10 +3,11 @@ name: CI on: push: - branches: [ "master", "v*" ] + branches: [ "main", "v*" ] pull_request: - branches: [ "master", "v*" ] + branches: [ "main", "v*" ] workflow_dispatch: + workflow_call: permissions: contents: read diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..4a62757 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,57 @@ +--- +name: Build and upload to PyPI + +permissions: + contents: read + +on: + workflow_dispatch: + inputs: + tag: + description: tag to build + required: true + type: string + testpypi: + description: upload to Test PyPI + type: boolean + default: false + pypi: + description: upload to PyPI + type: boolean + default: false + +jobs: + tests: + uses: ./.github/workflows/main.yml + pypi: + name: Build and upload to PyPI + runs-on: ubuntu-latest + needs: tests + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ inputs.tag || github.ref }} + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: "Update pip" + run: python -m pip install --upgrade pip setuptools wheel + - name: "Install 'build' and 'twine'" + run: python -m pip install --upgrade build twine + - name: "Run 'build'" + run: "python -m build" + - name: "Run twine check" + run: "python -m twine check dist/*" + - name: Publish distribution to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + if: inputs.testpypi || false + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} + if: inputs.pypi || false diff --git a/CHANGES.txt b/CHANGES.txt index 2cb81e8..244168f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Revision 0.3.0, released XX-08-2028 ------------------------------------ +Revision 0.3.0.rc1, released 08-08-2022 +--------------------------------------- - Added support for Python 3.8, 3.9, 3.10, 3.11 - Removed support for EOL Pythons 2.4, 2.5, 2.6, 3.2, 3.3, 3.4, 3.5 @@ -7,6 +7,11 @@ Revision 0.3.0, released XX-08-2028 - Modernized packaging and testing. pyasn1-modules now uses ``setup.cfg``, ``pyproject.toml``, [build](https://pypi.org/project/build/), and GitHub Actions. +- PyPI package ownership for `pyasn` and `pyasn-module` has been + transfered to *Christian Heimes* and *Simon Pichugin* in + [PyPI support ticket #2090](https://github.com/pypa/pypi-support/issues/2090). +- The upstream repositories for `pyasn1` and `pyasn1-modules` are now + in the GitHub organization https://github.com/pyasn1/. - Added tox runner with a handful of basic jobs - Add RFC3125 providing Electronic Signature Policies - Add RFC5126 providing CMS Advanced Electronic Signatures (CAdES) diff --git a/pyasn1_modules/__init__.py b/pyasn1_modules/__init__.py index 41dd7c5..c0680f6 100644 --- a/pyasn1_modules/__init__.py +++ b/pyasn1_modules/__init__.py @@ -1,2 +1,2 @@ # http://www.python.org/dev/peps/pep-0396/ -__version__ = '0.3.0.dev1' +__version__ = '0.3.0.rc1'