Skip to content

Commit d77ed13

Browse files
authored
Create python-publish.yml
1 parent 7f8c968 commit d77ed13

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Build and publish Python package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
environment:
19+
name: pypi
20+
url: https://pypi.org/project/rps-engine-client-python/
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.x"
27+
- name: Build release distributions
28+
run: |
29+
# NOTE: put your own distribution build steps here.
30+
python -m pip install build
31+
python -m build
32+
33+
- name: Install Poetry
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install poetry
37+
38+
- name: Install dependencies
39+
run: poetry install
40+
41+
- name: Build package
42+
run: poetry build
43+
44+
- name: Upload distributions
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: release-dists
48+
path: dist/
49+
50+
- name: Publish package to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1
52+

0 commit comments

Comments
 (0)