Skip to content

Commit

Permalink
Use tox to define the "release" command
Browse files Browse the repository at this point in the history
  • Loading branch information
Delgan committed Dec 3, 2024
1 parent 1516f5e commit 0d0c784
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 26 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/release.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Publish release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
tox -e release
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ description = Build the Python package.
commands =
pyproject-build .
twine check --strict dist/*

[testenv:release]
description = Publish a new release on PyPI.
passenv =
TWINE_USERNAME
TWINE_PASSWORD
commands =
{[testenv:packaging]commands}
twine upload dist/* --disable-progress-bar --verbose

0 comments on commit 0d0c784

Please sign in to comment.