Skip to content

Commit 28e54c9

Browse files
author
Ghislain Fourny
committed
Only trigger testpypi manually
1 parent 1e1c8db commit 28e54c9

3 files changed

Lines changed: 80 additions & 25 deletions

File tree

.github/workflows/deploy-test.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build:
7+
name: Build distribution 📦
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.x"
18+
- name: Install pypa/build
19+
run: >-
20+
python3 -m
21+
pip install
22+
build
23+
--user
24+
- name: Build a binary wheel and a source tarball
25+
run: python3 -m build
26+
- name: Store the distribution packages
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-package-distributions
30+
path: dist/
31+
32+
publish-to-pypi:
33+
name: >-
34+
Publish Python 🐍 distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
36+
needs:
37+
- build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: pypi
41+
url: https://pypi.org/p/jsoniq
42+
permissions:
43+
id-token: write # IMPORTANT: mandatory for trusted publishing
44+
45+
steps:
46+
- name: Download all the dists
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: python-package-distributions
50+
path: dist/
51+
- name: Publish distribution 📦 to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
54+
publish-to-testpypi:
55+
name: Publish Python 🐍 distribution 📦 to TestPyPI
56+
needs:
57+
- build
58+
runs-on: ubuntu-latest
59+
60+
environment:
61+
name: testpypi
62+
url: https://test.pypi.org/p/jsoniq
63+
64+
permissions:
65+
id-token: write # IMPORTANT: mandatory for trusted publishing
66+
67+
steps:
68+
- name: Download all the dists
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: python-package-distributions
72+
path: dist/
73+
- name: Publish distribution 📦 to TestPyPI
74+
uses: pypa/gh-action-pypi-publish@release/v1
75+
with:
76+
repository-url: https://test.pypi.org/legacy/

.github/workflows/deploy.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,3 @@ jobs:
5050
path: dist/
5151
- name: Publish distribution 📦 to PyPI
5252
uses: pypa/gh-action-pypi-publish@release/v1
53-
54-
publish-to-testpypi:
55-
name: Publish Python 🐍 distribution 📦 to TestPyPI
56-
needs:
57-
- build
58-
runs-on: ubuntu-latest
59-
60-
environment:
61-
name: testpypi
62-
url: https://test.pypi.org/p/jsoniq
63-
64-
permissions:
65-
id-token: write # IMPORTANT: mandatory for trusted publishing
66-
67-
steps:
68-
- name: Download all the dists
69-
uses: actions/download-artifact@v4
70-
with:
71-
name: python-package-distributions
72-
path: dist/
73-
- name: Publish distribution 📦 to TestPyPI
74-
uses: pypa/gh-action-pypi-publish@release/v1
75-
with:
76-
repository-url: https://test.pypi.org/legacy/

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,7 @@ marimo/_lsp/
207207
__marimo__/
208208

209209
# Emacs
210-
*~
210+
*~
211+
212+
# macOS
213+
.DS_Store

0 commit comments

Comments
 (0)