From c5e815184cd0d2873b4329d45780d9d8c1e4c082 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Wed, 31 May 2023 12:56:06 +1000 Subject: [PATCH] Use OIDC for PyPI releases and bump min Python (#56) --- .github/workflows/ci.yml | 32 ++++++++++++++------------------ CHANGELOG.md | 4 ++++ README.md | 2 +- setup.py | 6 +++--- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 196ec32..20c29cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,6 @@ on: types: - published - schedule: - - cron: 0 9 * * * - jobs: test: name: test @@ -35,11 +32,11 @@ jobs: - ubuntu-latest - windows-latest python-version: - - 3.6 - 3.7 - 3.8 - 3.9 - '3.10' + - '3.11' python-arch: - x86 - x64 @@ -49,9 +46,9 @@ jobs: python-arch: x86 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.python-arch }} @@ -59,7 +56,8 @@ jobs: - name: Extract OS name shell: bash run: | - echo "##[set-output name=name;]$( echo '${{ matrix.os }}' | tr '-' ' ' | awk '{print $1}' )" + echo NAME=$( echo '${{ matrix.os }}' | tr '-' ' ' | awk '{print $1}' ) + echo "name=${NAME}" >> $GITHUB_OUTPUT id: os - name: Test @@ -75,21 +73,21 @@ jobs: - name: Upload Test Results if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Unit Test Results (${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.python-arch }}) path: ./junit/test-results.xml - name: Upload Coverage Results if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Coverage Results (${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.python-arch }}) path: ./coverage.xml - name: Upload Coverage to codecov if: always() - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: files: ./coverage.xml flags: ${{ steps.os.outputs.name }},py${{ matrix.python-version }},${{ matrix.python-arch }} @@ -99,11 +97,12 @@ jobs: needs: - test runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write - - name: Set up Python - uses: actions/setup-python@v2 + steps: + - uses: actions/checkout@v3 - name: Installing baseline packages run: python -m pip install --upgrade pip setuptools wheel @@ -112,7 +111,7 @@ jobs: run: python setup.py sdist bdist_wheel - name: Capture Wheel and SDist - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: artifact path: dist/* @@ -120,6 +119,3 @@ jobs: - name: Publish if: startsWith(github.ref, 'refs/tags/v') uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f6eb257..94e719b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.4.0 - TBD + +* Dropped Python 3.6, new minimum is 3.7 + ## 0.3.0 - 2021-10-22 * Dropped Python 2.7 and 3.5, new minimum is 3.6 diff --git a/README.md b/README.md index c5ead58..d37520a 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ decoded by someone who knows the protocol. ## Requirements -* Python 3.6+ +* Python 3.7+ * [smbprotocol](https://github.com/jborean93/smbprotocol) To install pypsexec, simply run diff --git a/setup.py b/setup.py index 99327bd..2991009 100644 --- a/setup.py +++ b/setup.py @@ -18,13 +18,13 @@ def abs_path(rel_path): setup( name='pypsexec', - version='0.3.0', + version='0.4.0', packages=['pypsexec'], install_requires=[ 'smbprotocol', ], include_package_data=True, - python_requires='>=3.6', + python_requires='>=3.7', author='Jordan Borean', author_email='jborean93@gmail.com', url='https://github.com/jborean93/pypsexec', @@ -37,10 +37,10 @@ def abs_path(rel_path): 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], )