File tree Expand file tree Collapse file tree 1 file changed +43
-13
lines changed Expand file tree Collapse file tree 1 file changed +43
-13
lines changed Original file line number Diff line number Diff line change 1- name : Publish PyPI Package
1+ name : Publish to PyPI
22
33on :
4- push :
5- tags :
6- - ' *'
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ env :
9+ tag_name : ${{ github.event.release.tag_name || github.ref_name }}
10+ artifact-name : flagsmith-python-client-${{ github.event.release.tag_name || github.ref_name }}
711
812jobs :
9- package :
13+ build :
1014 runs-on : ubuntu-latest
11- name : Publish Pypi Package
1215
1316 steps :
14- - name : Cloning repo
15- uses : actions/checkout@v4
17+ - uses : actions/checkout@v4
1618 with :
1719 fetch-depth : 0
1820
19- - name : Build and publish to pypi
20- 21+ - uses : actions/setup-python@v4
22+ with :
23+ python-version : 3.12
24+
25+ - name : Install Poetry
26+ run : pipx install poetry
27+
28+ - name : Build Package
29+ run : poetry build
30+
31+ - uses : actions/upload-artifact@v4
32+ with :
33+ name : ${{ env.artifact-name }}
34+ path : dist/
35+
36+ - uses : softprops/action-gh-release@v2
2137 with :
22- pypi_token : ${{ secrets.PYPI_API_TOKEN }}
23- ignore_dev_requirements : ' yes'
24- build_format : ' sdist'
38+ tag_name : ${{ env.tag_name }}
39+ files : dist/*
40+
41+ publish :
42+ runs-on : ubuntu-latest
43+ needs : build
44+
45+ permissions :
46+ id-token : write # for pypa/gh-action-pypi-publish to authenticate with PyPI
47+
48+ steps :
49+ - uses : actions/download-artifact@v4
50+ with :
51+ name : ${{ env.artifact-name }}
52+ path : dist/
53+
54+ - uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments