Skip to content

Commit 88e0f55

Browse files
committed
trusted publisher Pypi
1 parent 909874b commit 88e0f55

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/build.yml

+29-9
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,45 @@ jobs:
2121
deploy:
2222
name: Deploy on PyPI
2323
needs: lint
24+
if: >
25+
github.event_name == 'push' &&
26+
startsWith(github.ref, 'refs/tags') &&
27+
github.base_ref == 'main' &&
28+
github.actor == github.repository_owner
2429
runs-on: ubuntu-latest
25-
environment: release
26-
permissions:
27-
id-token: write
2830
timeout-minutes: 10
31+
environment:
32+
name: pypi
33+
url: https://pypi.org/p/lymbo
34+
permissions:
35+
id-token: write # IMPORTANT: mandatory for trusted publishing
2936
steps:
3037
- uses: actions/checkout@v4
3138
- name: Set up Python ${{ matrix.python-version }}
3239
uses: actions/setup-python@v5
3340
with:
34-
python-version: 3.9
41+
python-version: 3.11
3542
- name: Install pypa/build
3643
run: |
3744
python -m pip install --upgrade pip
3845
python -m pip install --upgrade setuptools wheel
3946
python -m pip install build --user
4047
- name: Build a binary wheel and a source tarball
41-
run: |
42-
python -m build --sdist --wheel --outdir dist/
43-
- name: Publish package distributions to PyPI
44-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
45-
uses: pypa/gh-action-pypi-publish@release/v1
48+
run: python3 -m build
49+
- name: Store the distribution packages
50+
if: >
51+
github.event_name == 'push' &&
52+
startsWith(github.ref, 'refs/tags') &&
53+
github.base_ref == 'main' &&
54+
github.actor == github.repository_owner
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: python-package-distributions
58+
path: dist/
59+
- name: Publish package on Pypi
60+
if: >
61+
github.event_name == 'push' &&
62+
startsWith(github.ref, 'refs/tags') &&
63+
github.base_ref == 'main' &&
64+
github.actor == github.repository_owner
65+
uses: pypa/gh-action-pypi-publish@release/v1

notebook_httpdbg/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
__all__ = ["load_ipython_extension", "unload_ipython_extension"]
55

6-
VERSION = "0.3.0"
6+
VERSION = "0.3.1"

0 commit comments

Comments
 (0)