Skip to content

Commit 4f18ad3

Browse files
committed
Update release workflow to use pyproject.toml
1 parent 0b2d7d4 commit 4f18ad3

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
name: Release
2-
on:
3-
release:
4-
types: [published]
2+
on: [push]
53

64
jobs:
75
publish:
8-
name: Deploy Release to PyPI
9-
# Last version with Python 3.7 binaries available
10-
runs-on: ubuntu-22.04
6+
name: Deploy release to PyPI
7+
runs-on: ubuntu-latest
8+
permissions:
9+
id-token: write
10+
environment:
11+
name: splunk-pypi
1112
steps:
1213
- name: Checkout source
1314
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
1415
- name: Set up Python
1516
uses: actions/setup-python@3d1e2d2ca0a067f27da6fec484fce7f5256def85
1617
with:
17-
python-version: 3.7
18+
python-version: 3.9
1819
- name: Install dependencies
19-
run: pip install twine
20+
run: pip install build
2021
- name: Build package
21-
run: python setup.py sdist bdist_wheel
22+
run: python -m build
2223
- name: Publish package to PyPI
2324
uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
2425
with:
2526
user: __token__
26-
password: ${{ secrets.pypi_password }}
27+
password: ${{ secrets.PYPI_PASSWORD }}
2728
- name: Install tox
2829
run: pip install tox
2930
- name: Generate API docs
@@ -35,10 +36,3 @@ jobs:
3536
with:
3637
name: python_sdk_docs
3738
path: docs/_build/html
38-
# Test upload
39-
# - name: Publish package to TestPyPI
40-
# uses: pypa/gh-action-pypi-publish@d417ba7e7683fa9104c42abe611c1f2c93c0727d
41-
# with:
42-
# user: __token__
43-
# password: ${{ secrets.test_pypi_password }}
44-
# repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)