Skip to content

Commit

Permalink
chore: release v4
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Dec 24, 2024
1 parent e869b15 commit 280254c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,39 @@ jobs:
pip3 install --upgrade pip
pip3 install tox
TOXENV=${{ matrix.toxenv }} ALGOLIA_APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} tox
release:
name: Publish
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/algoliasearch-django
permissions:
id-token: write
needs:
- build
if: |
always() &&
startsWith(github.event.head_commit.message, 'chore: release')
!contains(needs.*.result, 'cancelled') &&
!contains(needs.*.result, 'failure') &&
github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.13

- name: Install dependencies and release
timeout-minutes: 20
run: |
python -m venv python-ci-run
source python-ci-run/bin/activate
pip3 install --upgrade pip
pip3 install tox
tox release
- name: Publish algoliasearch package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 3 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ twine = >=5.1,<6.0
wheel = >=0.45,<1.0
ruff = >=0.7.4,<1.0
pyright = >=1.1.389,<2.0
setuptools = >=75.0,<76.0

[testenv:coverage]
basepython = python3.13
Expand All @@ -52,18 +53,15 @@ commands =
coverage report
coveralls

[testenv:release]
[testenv:build]
basepython = python3.13
deps =
twine {[versions]twine}
wheel {[versions]wheel}
passenv =
PYPI_USER
PYPI_PASSWORD
setuptools {[versions]setuptools}
commands =
python setup.py sdist bdist_wheel
twine check dist/*
twine upload -u {env:PYPI_USER} -p {env:PYPI_PASSWORD} --repository-url https://upload.pypi.org/legacy/ dist/*

[testenv:lint]
deps =
Expand Down

0 comments on commit 280254c

Please sign in to comment.