File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 96
96
pip3 install --upgrade pip
97
97
pip3 install tox
98
98
TOXENV=${{ matrix.toxenv }} ALGOLIA_APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} tox
99
+
100
+ release :
101
+ name : Publish
102
+ runs-on : ubuntu-22.04
103
+ environment :
104
+ name : pypi
105
+ url : https://pypi.org/p/algoliasearch-django
106
+ permissions :
107
+ id-token : write
108
+ needs :
109
+ - build
110
+ if : |
111
+ always() &&
112
+ startsWith(github.event.head_commit.message, 'chore: release')
113
+ !contains(needs.*.result, 'cancelled') &&
114
+ !contains(needs.*.result, 'failure') &&
115
+ github.ref == 'refs/heads/master'
116
+ steps :
117
+ - uses : actions/checkout@v4
118
+
119
+ - name : Set up Python
120
+ uses : actions/setup-python@v4
121
+ with :
122
+ python-version : 3.13
123
+
124
+ - name : Install dependencies and release
125
+ timeout-minutes : 20
126
+ run : |
127
+ python -m venv python-ci-run
128
+ source python-ci-run/bin/activate
129
+ pip3 install --upgrade pip
130
+ pip3 install tox
131
+ tox release
132
+
133
+ - name : Publish algoliasearch package to PyPI
134
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ twine = >=5.1,<6.0
30
30
wheel = >=0.45,<1.0
31
31
ruff = >=0.7.4,<1.0
32
32
pyright = >=1.1.389,<2.0
33
+ setuptools = >=75.0,<76.0
33
34
34
35
[testenv:coverage]
35
36
basepython = python3.13
@@ -52,18 +53,15 @@ commands =
52
53
coverage report
53
54
coveralls
54
55
55
- [testenv:release ]
56
+ [testenv:build ]
56
57
basepython = python3.13
57
58
deps =
58
59
twine {[versions]twine}
59
60
wheel {[versions]wheel}
60
- passenv =
61
- PYPI_USER
62
- PYPI_PASSWORD
61
+ setuptools {[versions]setuptools}
63
62
commands =
64
63
python setup.py sdist bdist_wheel
65
64
twine check dist/*
66
- twine upload -u {env:PYPI_USER} -p {env:PYPI_PASSWORD} --repository-url https://upload.pypi.org/legacy/ dist/*
67
65
68
66
[testenv:lint]
69
67
deps =
You can’t perform that action at this time.
0 commit comments