@@ -75,13 +75,116 @@ jobs:
7575 popd
7676 shell : bash
7777
78- - name : Lint
78+ # - name: Lint
79+ # run: |
80+ # poetry run python -m finecode run lint
81+ # shell: bash
82+
83+ - name : Build finecode_extension_api
84+ if : runner.os == 'Linux'
85+ run : |
86+ pushd finecode_extension_api
87+ poetry build
88+ popd
89+ shell : bash
90+
91+ - name : Build fine_python_black
92+ if : runner.os == 'Linux'
93+ run : |
94+ pushd extensions/fine_python_black
95+ poetry build
96+ popd
97+ shell : bash
98+
99+ - name : Build fine_python_isort
100+ if : runner.os == 'Linux'
101+ run : |
102+ pushd extensions/fine_python_isort
103+ poetry build
104+ popd
105+ shell : bash
106+
107+ - name : Build fine_python_format
108+ if : runner.os == 'Linux'
79109 run : |
80- poetry run python -m finecode run lint
110+ pushd presets/fine_python_format
111+ poetry build
112+ popd
81113 shell : bash
82114
115+ # - name: Build finecode
116+ # if: runner.os == 'Linux'
117+ # run: |
118+ # poetry build
119+ # shell: bash
120+
121+ - name : Collect all distribution packages
122+ if : runner.os == 'Linux'
123+ run : |
124+ mkdir -p dist
125+ cp finecode_extension_api/dist/* dist/
126+ # cp extensions/fine_python_black/dist/* dist/
127+ # cp extensions/fine_python_isort/dist/* dist/
128+ # cp presets/fine_python_format/dist/* dist/
129+ shell : bash
130+
131+
132+ - name : Store the distribution packages
133+ uses : actions/upload-artifact@v4
134+ if : runner.os == 'Linux'
135+ with :
136+ name : python-package-distributions
137+ path : dist/
138+
83139 # - name: Run unit tests
84140 # if: ${{ !cancelled() }}
85141 # run: |
86142 # poetry run python -m pytest tests/
87143 # shell: bash
144+
145+ publish-to-pypi :
146+ name : >-
147+ Publish Python 🐍 distribution 📦 to PyPI
148+ if : startsWith(github.ref, 'refs/tags/')
149+ needs :
150+ - build
151+ runs-on : ubuntu-24.04
152+ environment :
153+ name : pypi
154+ url : https://pypi.org/p/finecode
155+ permissions :
156+ id-token : write # IMPORTANT: mandatory for trusted publishing
157+
158+ steps :
159+ - name : Download all the dists
160+ uses : actions/download-artifact@v4
161+ with :
162+ name : python-package-distributions
163+ path : dist/
164+ - name : Publish distribution 📦 to PyPI
165+ uses : pypa/gh-action-pypi-publish@release/v1
166+
167+ publish-to-testpypi :
168+ name : Publish Python 🐍 distribution 📦 to TestPyPI
169+ needs :
170+ - build
171+ runs-on : ubuntu-24.04
172+
173+ environment :
174+ name : testpypi
175+ url : https://test.pypi.org/p/finecode
176+
177+ permissions :
178+ id-token : write # IMPORTANT: mandatory for trusted publishing
179+
180+ steps :
181+ - name : Download all the dists
182+ uses : actions/download-artifact@v4
183+ with :
184+ name : python-package-distributions
185+ path : dist/
186+ - name : Publish distribution 📦 to TestPyPI
187+ uses : pypa/gh-action-pypi-publish@release/v1
188+ with :
189+ repository-url : https://test.pypi.org/legacy/
190+ verbose : true
0 commit comments