Skip to content

Commit 17398c2

Browse files
authored
trusted publisher Pypi (#7)
1 parent 909874b commit 17398c2

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/build.yml

+20-7
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,35 @@ jobs:
2424
runs-on: ubuntu-latest
2525
environment: release
2626
permissions:
27-
id-token: write
27+
id-token: write # IMPORTANT: mandatory for trusted publishing
2828
timeout-minutes: 10
2929
steps:
3030
- uses: actions/checkout@v4
3131
- name: Set up Python ${{ matrix.python-version }}
3232
uses: actions/setup-python@v5
3333
with:
34-
python-version: 3.9
34+
python-version: 3.11
3535
- name: Install pypa/build
3636
run: |
3737
python -m pip install --upgrade pip
3838
python -m pip install --upgrade setuptools wheel
3939
python -m pip install build --user
4040
- 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
41+
run: python3 -m build
42+
- name: Store the distribution packages
43+
if: >
44+
github.event_name == 'push' &&
45+
startsWith(github.ref, 'refs/tags') &&
46+
github.base_ref == 'main' &&
47+
github.actor == github.repository_owner
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: python-package-distributions
51+
path: dist/
52+
- name: Publish package on Pypi
53+
if: >
54+
github.event_name == 'push' &&
55+
startsWith(github.ref, 'refs/tags') &&
56+
github.base_ref == 'main' &&
57+
github.actor == github.repository_owner
58+
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)