Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 51 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,74 @@ name: ci
on:
push:
branches: [main]
tags: ['*']
tags: ["v*"]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- uses: dtolnay/rust-toolchain@stable
- run: python -m pip install maturin pytest
- run: maturin build --locked --out dist
- run: python -m pip install --no-index --find-links dist python-dotenvx
- run: python -m pytest

# run only on semantic version tag
release:
wheels:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64
manylinux: "2014"
- os: ubuntu-latest
target: aarch64
manylinux: "2014"
- os: macos-13
target: x86_64
- os: macos-14
target: aarch64
- os: windows-latest
target: x64
steps:
- uses: actions/checkout@v4
# GITHUB_ENV operates like a .env file
- name: extract version
run: |
VERSION=${GITHUB_REF#refs/tags/}
CLEAN_VERSION=${VERSION#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux }}
args: --release --out dist
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.target }}
path: dist

pypi:
needs: release
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
python-version: '3.11'
- run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install setuptools wheel twine build
- name: publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: make release
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ __pycache__/

# C extensions
*.so
*.pyd
*.dylib

# Distribution / packaging
.Python
Expand Down Expand Up @@ -73,6 +75,7 @@ docs/_build/

# PyBuilder
target/
.tmp-publish/

# Jupyter Notebook
.ipynb_checkpoints
Expand Down
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,34 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [Unreleased](https://github.com/dotenvx/python-dotenvx/compare/v0.3.0...main)
## [Unreleased](https://github.com/dotenvx/python-dotenvx/compare/v2.0.0...main)

## [2.0.0](https://github.com/dotenvx/python-dotenvx/compare/v0.3.0...v2.0.0)

### Added

- Add `load_dotenv`, `dotenv_values`, and `find_dotenv` with the same public
arguments and defaults as `python-dotenv`.
- Add native dotenv parsing, expansion, command substitution, and decryption
through `dotenvx-primitives` 2.1.1.
- Add automatic decryption using `DOTENV_PRIVATE_KEY` environment variables
or a neighboring `.env.keys` file.
- Add conformance tests against `python-dotenv` 1.2.2, plus dotenvx encrypted
loading behavior.

### Changed

- Package the Rust implementation as a PyO3 native extension inside each
Python wheel.
- Build and publish Linux, macOS, and Windows wheels using Maturin.
- Use Python ABI3 wheels compatible with CPython 3.8 and newer.
- Keep `load_dotenvx` as a backward-compatible API returning parsed values.

### Removed

- Remove the `dotenvx-postinstall` command and runtime dotenvx CLI download.
- Remove the external dotenvx executable dependency.
- Remove the legacy setuptools build configuration.

## [0.3.0](https://github.com/dotenvx/dotenvx/compare/v0.2.6...v0.3.0)

Expand Down
Loading
Loading