Skip to content

Commit a7154f5

Browse files
authored
ci: refactor release to avoid using deprecated package
1 parent 2843f30 commit a7154f5

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.github/workflows/release.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Release
22

33
on:
4+
workflow_dispatch:
45
push:
56
# Sequence of patterns matched against refs/tags
67
tags:
@@ -47,17 +48,17 @@ jobs:
4748
id: get_version
4849
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
4950
shell: bash
50-
51-
- name: Upload Release Asset
52-
id: upload-release-asset
53-
uses: actions/upload-release-asset@v1
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Rename release file
53+
run: mv downloader.zip downloader_${{ steps.get_version.outputs.VERSION }}_win.zip
54+
shell: bash
55+
56+
- name: Release
57+
uses: softprops/action-gh-release@v1
58+
if: startsWith(github.ref, 'refs/tags/')
5659
with:
57-
upload_url: ${{ steps.create_release.outputs.upload_url }}
58-
asset_path: downloader.zip
59-
asset_name: downloader_${{ steps.get_version.outputs.VERSION }}_win.zip
60-
asset_content_type: application/zip
60+
generate_release_notes: true
61+
files: downloader_${{ steps.get_version.outputs.VERSION }}_win.zip
6162

6263
release:
6364

0 commit comments

Comments
 (0)