Skip to content

Commit 1dc9cba

Browse files
committed
[FC-35521] publish git tags to pypi
1 parent e983c16 commit 1dc9cba

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: publish batou_ext to pypi
2+
on: push
3+
4+
jobs:
5+
build:
6+
name: build batou_ext
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: "3.x"
14+
- run: python3 -m pip install build --user
15+
- run: python3 -m build
16+
- name: store the artifact
17+
uses: actions/upload-artifact@v3
18+
with:
19+
name: python-package-distributions
20+
path: dist/
21+
22+
23+
publish-to-pypi:
24+
name: Publish batou_ext to pypi
25+
if: startsWith(github.ref, 'refs/tags/')
26+
needs:
27+
- build
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/batou_ext
32+
permissions:
33+
id-token: write
34+
35+
steps:
36+
- name: Download all the dists
37+
uses: actions/download-artifact@v3
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
- name: Publish batou_ext to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/include/
66
/pyvenv.cfg
77
/.tox/
8+
dist/

0 commit comments

Comments
 (0)