Skip to content

Commit 31d78aa

Browse files
authored
trusted publisher Pypi (#10)
1 parent f98fa64 commit 31d78aa

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,35 @@ jobs:
4444
name: Deploy on PyPI
4545
needs: testospython
4646
runs-on: ubuntu-latest
47+
environment: release
48+
permissions:
49+
id-token: write # IMPORTANT: mandatory for trusted publishing
4750
timeout-minutes: 10
4851
steps:
4952
- uses: actions/checkout@v4
5053
- name: Set up Python ${{ matrix.python-version }}
5154
uses: actions/setup-python@v5
5255
with:
53-
python-version: 3.9
56+
python-version: 3.11
5457
- name: Install pypa/build
5558
run: |
5659
python -m pip install --upgrade pip
5760
python -m pip install --upgrade setuptools wheel
5861
python -m pip install build --user
5962
- name: Build a binary wheel and a source tarball
60-
run: |
61-
python -m build --sdist --wheel --outdir dist/
63+
run: python3 -m build
64+
- name: Store the distribution packages
65+
if: >
66+
github.event_name == 'push' &&
67+
startsWith(github.ref, 'refs/tags') &&
68+
github.actor == github.repository_owner
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: python-package-distributions
72+
path: dist/
6273
- name: Publish package on Pypi
63-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
74+
if: >
75+
github.event_name == 'push' &&
76+
startsWith(github.ref, 'refs/tags') &&
77+
github.actor == github.repository_owner
6478
uses: pypa/gh-action-pypi-publish@release/v1
65-
with:
66-
user: __token__
67-
password: ${{ secrets.PYPI_API_TOKEN }}

pytest_httpdbg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22
from pytest_httpdbg.plugin import httpdbg_record_filename # noqa F401
33

4-
__version__ = "0.6.0"
4+
__version__ = "0.6.1"

0 commit comments

Comments
 (0)