Skip to content

Commit 34b2e7b

Browse files
committed
switch to other github release action
1 parent 0b4b8f5 commit 34b2e7b

File tree

1 file changed

+8
-57
lines changed

1 file changed

+8
-57
lines changed

.github/workflows/build-test-package-publish.yml

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
uses: actions/setup-node@v3
174174
with:
175175
node-version: "16"
176-
cache: 'npm'
176+
cache: "npm"
177177
cache-dependency-path: package-lock.json
178178

179179
- name: install node modules
@@ -249,7 +249,7 @@ jobs:
249249
uses: actions/setup-node@v3
250250
with:
251251
node-version: "16"
252-
cache: 'npm'
252+
cache: "npm"
253253
cache-dependency-path: package-lock.json
254254

255255
- name: install node modules
@@ -280,62 +280,13 @@ jobs:
280280
echo "release_notes=$REL_NOTES" >> $GITHUB_OUTPUT
281281
echo "is_prelease=$(poetry run npm run --silent is-prerelease)" >> $GITHUB_OUTPUT
282282
283-
- name: find assets
284-
id: find_assets
285-
run: |
286-
echo "vsix_file=$(find dist -iname '*.vsix')" >> $GITHUB_OUTPUT
287-
echo "vsix_name=$(find dist -iname '*.vsix' -printf '%f\n')" >> $GITHUB_OUTPUT
288-
289-
echo "whl_file=$(find dist -iname '*.whl')" >> $GITHUB_OUTPUT
290-
echo "whl_name=$(find dist -iname '*.whl' -printf '%f\n')" >> $GITHUB_OUTPUT
291-
292-
echo "tar_gz_file=$(find dist -iname '*.tar.gz')" >> $GITHUB_OUTPUT
293-
echo "tar_gz_name=$(find dist -iname '*.tar.gz' -printf '%f\n')" >> $GITHUB_OUTPUT
294-
295-
- name: create github release
296-
id: create_release
297-
uses: actions/create-release@v1
298-
env:
299-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
300-
with:
301-
tag_name: ${{ github.ref }}
302-
release_name: ${{ github.ref }}
303-
body: ${{ steps.get_release_informations.outputs.release_notes }}
304-
draft: false
305-
prerelease: ${{ steps.get_release_informations.outputs.is_prelease }}
306-
307-
- name: upload vsix asset to github release
308-
id: upload-vsix-asset
309-
uses: actions/upload-release-asset@v1
310-
env:
311-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
312-
with:
313-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
314-
asset_path: ${{ steps.find_assets.outputs.vsix_file }}
315-
asset_name: ${{ steps.find_assets.outputs.vsix_name }}
316-
asset_content_type: application/vsix
317-
318-
- name: upload whl asset to github release
319-
id: upload-whl-asset
320-
uses: actions/upload-release-asset@v1
321-
env:
322-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
323-
with:
324-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
325-
asset_path: ${{ steps.find_assets.outputs.whl_file }}
326-
asset_name: ${{ steps.find_assets.outputs.whl_name }}
327-
asset_content_type: application/whl
328-
329-
- name: upload tar.gz asset to github release
330-
id: upload-tar-gz-asset
331-
uses: actions/upload-release-asset@v1
332-
env:
333-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
283+
- name: create guthub release
284+
uses: ncipollo/release-action@v1
334285
with:
335-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
336-
asset_path: ${{ steps.find_assets.outputs.tar_gz_file }}
337-
asset_name: ${{ steps.find_assets.outputs.tar_gz_name }}
338-
asset_content_type: application/whl
286+
artifacts: "dist/*"
287+
prerelease: ${{ steps.get_release_informations.outputs.is_prelease }}
288+
body: ${{ steps.get_release_informations.outputs.release_notes }}
289+
token: ${{ secrets.GITHUB_TOKEN }}
339290

340291
- name: publish vsix and python packages
341292
run: poetry run npm run publish

0 commit comments

Comments
 (0)