Skip to content

Commit 18879c3

Browse files
committed
fix: adding release to pypi action
1 parent 07056c5 commit 18879c3

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://test.pypi.org/project/cloudbees-openfeature-provider-python
18+
permissions:
19+
id-token: write
20+
steps:
21+
- uses: google-github-actions/release-please-action@v4
22+
id: release
23+
with:
24+
release-type: python
25+
- uses: actions/checkout@v4
26+
if: ${{ steps.release.outputs.release_created }}
27+
- uses: actions/setup-python@v5
28+
if: ${{ steps.release.outputs.release_created }}
29+
with:
30+
python-version: 'python:3.8'
31+
- name: Install dependencies
32+
if: ${{ steps.release.outputs.release_created }}
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install build
36+
- name: Build package
37+
if: ${{ steps.release.outputs.release_created }}
38+
run: python -m build
39+
- name: Publish package
40+
if: ${{ steps.release.outputs.release_created }}
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)