@@ -171,85 +171,72 @@ jobs:
171
171
name : wheel-package
172
172
path : dist/*.whl
173
173
174
- # publish:
175
- # runs-on: ubuntu-latest
176
- # needs: package
177
- # if: success() && startsWith( github.ref, 'refs/tags/v')
178
- # steps:
179
- # - uses: actions/checkout@v3
180
- # with:
181
- # fetch-depth: 0
182
-
183
- # - run: git describe --tag
184
-
185
- # - name: setup python environment
186
- # id: setup-python
187
- # uses: actions/setup-python@v4
188
- # with:
189
- # python-version: "3.8"
190
-
191
- # - name: install Poetry
192
- # uses: snok/install-poetry@v1
193
- # with:
194
- # virtualenvs-create: true
195
- # virtualenvs-in-project: true
196
-
197
- # - name: Load cached venv
198
- # id: cached-poetry-dependencies
199
- # uses: actions/cache@v3
200
- # with:
201
- # path: .venv
202
- # key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
203
-
204
- # - name: Install dependencies
205
- # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
206
- # run: poetry install --no-interaction --no-root
207
-
208
- # - name: install robotcode
209
- # run: poetry install --no-interaction
210
-
211
- # - name: Setup Node.js environment
212
- # uses: actions/setup-node@v3
213
- # with:
214
- # node-version: "16"
215
- # cache: "npm"
216
- # cache-dependency-path: package-lock.json
217
-
218
- # - name: install node modules
219
- # run: npm install --also=dev
220
-
221
- # - uses: actions/download-artifact@v3
222
- # with:
223
- # name: vscode-package
224
- # path: dist
225
- # - uses: actions/download-artifact@v3
226
- # with:
227
- # name: python-package
228
- # path: dist
229
- # - uses: actions/download-artifact@v3
230
- # with:
231
- # name: wheel-package
232
- # path: dist
233
-
234
- # - name: get release informations
235
- # id: get_release_informations
236
- # run: |
237
- # poetry run npm run --silent extract-release-notes > ./auto_relnotes.md
238
-
239
- # echo "is_prelease=$(poetry run npm run --silent is-prerelease)" >> $GITHUB_OUTPUT
240
-
241
- # - name: create github release
242
- # uses: ncipollo/release-action@v1
243
- # with:
244
- # artifacts: "dist/*"
245
- # prerelease: ${{ steps.get_release_informations.outputs.is_prelease }}
246
- # bodyFile: ./auto_relnotes.md
247
- # token: ${{ secrets.GITHUB_TOKEN }}
248
-
249
- # - name: publish vsix and python packages
250
- # run: poetry run npm run publish
251
- # env:
252
- # VSCE_PAT: ${{ secrets.VSCE_PAT }}
253
- # OVSX_PAT: ${{ secrets.OVSX_PAT }}
254
- # PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
255
- # PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
174
+ publish :
175
+ runs-on : ubuntu-latest
176
+ needs : package
177
+ if : success() && startsWith( github.ref, 'refs/tags/v')
178
+ steps :
179
+ - uses : actions/checkout@v3
180
+ with :
181
+ fetch-depth : 0
182
+
183
+ - run : git describe --tag
184
+
185
+ - name : setup python environment
186
+ id : setup-python
187
+ uses : actions/setup-python@v4
188
+ with :
189
+ python-version : " 3.8"
190
+
191
+ - name : Ensure latest pip is installed
192
+ run : python -m pip install --upgrade pip
193
+
194
+ - name : Ensure latest hatch is installed
195
+ run : python -m pip install --upgrade hatch
196
+ run : hatch env create build
197
+
198
+ - name : Setup Node.js environment
199
+ uses : actions/setup-node@v3
200
+ with :
201
+ node-version : " 16"
202
+ cache : " npm"
203
+ cache-dependency-path : package-lock.json
204
+
205
+ - name : install node modules
206
+ run : npm install --also=dev
207
+
208
+ - uses : actions/download-artifact@v3
209
+ with :
210
+ name : vscode-package
211
+ path : dist
212
+ - uses : actions/download-artifact@v3
213
+ with :
214
+ name : python-package
215
+ path : dist
216
+ - uses : actions/download-artifact@v3
217
+ with :
218
+ name : wheel-package
219
+ path : dist
220
+
221
+ - name : get release informations
222
+ id : get_release_informations
223
+ run : |
224
+ hatch -q run build:extract-release-notes > ./auto_relnotes.md
225
+
226
+ echo "is_prelease=$(hatch -q run build:is-prerelease)" >> $GITHUB_OUTPUT
227
+
228
+ - name : create github release
229
+ uses : ncipollo/release-action@v1
230
+ with :
231
+ artifacts : " dist/*"
232
+ prerelease : ${{ steps.get_release_informations.outputs.is_prelease }}
233
+ bodyFile : ./auto_relnotes.md
234
+ token : ${{ secrets.GITHUB_TOKEN }}
235
+
236
+ - name : publish vsix and python packages
237
+ run : hatch -q run build:publish
238
+ env :
239
+ VSCE_PAT : ${{ secrets.VSCE_PAT }}
240
+ OVSX_PAT : ${{ secrets.OVSX_PAT }}
241
+ PYPI_USERNAME : ${{ secrets.PYPI_USERNAME }}
242
+ PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
0 commit comments