Skip to content

Commit 2821db4

Browse files
committed
add ci - publish
1 parent cb3fce2 commit 2821db4

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload Python Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Python
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: '3.x'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install build
18+
- name: Build
19+
run: |
20+
python -m build
21+
- name: Store the distribution packages
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: python-package-distributions
25+
path: dist/
26+
27+
pypi-publish:
28+
runs-on: ubuntu-latest
29+
needs:
30+
- build
31+
environment:
32+
name: release
33+
url: https://pypi.org/p/openstack-lb-info
34+
permissions:
35+
id-token: write
36+
steps:
37+
- name: Download all the dists
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: python-package-distributions
41+
path: dist/
42+
- name: Publish distribution to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)