Skip to content

Commit

Permalink
Fix handling of _version.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Jan 29, 2025
1 parent 0b2a025 commit a175509
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,43 @@ jobs:
name: dist-${{ github.run_id }}
path: ./dist/*.*

test_dist:
name: Test Distribution Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-python@v5
with:
# Build sdist on lowest supported Python
python-version: '3.9'

- name: Download the dists
uses: actions/download-artifact@v4
with:
name: dist-${{ github.run_id }}
path: dist/

- name: Test the sdist
run: |
cd dist
pip install *.tar.gz
python -c "import flask_pymongo"
pip uninstall -y flask_pymongo
- name: Test the wheel
run: |
cd dist
pip install *.whl
python -c "import flask_pymongo"
pip uninstall -y flask_pymongo

Check warning

Code scanning / zizmor

overly broad permissions Warning

overly broad permissions
publish:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi
needs: [build_dist]
needs: [test_dist]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment: release
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ _build
dist/
*.pyc
.pytest_cache/
_version.py
version.txt
.eggs/
.tox/
build/
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- TDB

## 3.0.1 Jan 29, 2005

- Fix inclusion of `_version.py` file.

## 3.0.0: Jan 29, 2025

- Support Flask 3.0+ and PyMongo 4.0+.
Expand Down

0 comments on commit a175509

Please sign in to comment.