Skip to content

Commit

Permalink
Use OIDC for PyPI releases and bump min Python (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 authored May 31, 2023
1 parent 95c312b commit c5e8151
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ on:
types:
- published

schedule:
- cron: 0 9 * * *

jobs:
test:
name: test
Expand All @@ -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
Expand All @@ -49,17 +46,18 @@ 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 }}

- 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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -112,14 +111,11 @@ 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/*

- 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 }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
url='https://github.com/jborean93/pypsexec',
Expand All @@ -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',
],
)

0 comments on commit c5e8151

Please sign in to comment.