Skip to content

Commit db07525

Browse files
authored
Update pack.yml
1 parent d8856c0 commit db07525

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

.github/workflows/pack.yml

+25-9
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,32 @@ jobs:
2828
- name: Package as zip
2929
run: |
3030
md release_package
31-
copy bin\release\* release_package
32-
compress-archive -Path release_package -DestinationPath rmdup_${{github.ref_name}}.zip
31+
copy .\bin\Release\net8.0\* .\release_package
32+
compress-archive -Path .\release_package\*.* -DestinationPath rmdup_${{github.sha}}.zip
3333
- name : Upload artifact
3434
uses: actions/upload-artifact@v4
3535
with:
36-
name: rmdup_${{github.ref_name}}.zip
37-
path: rmdup_${{github.ref_name}}.zip
38-
39-
- name: Release
40-
uses: softprops/action-gh-release@v2
41-
if: startsWith(github.ref, 'refs/tags/')
36+
name: rmdup_${{github.sha}}.zip
37+
path: rmdup_${{github.sha}}.zip
38+
39+
- name: release to github
40+
id: create_release
41+
if: startsWith(github.ref,'refs/tags/')
42+
uses: actions/create-release@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag_name: ${{ github.sha }}
47+
release_name: ${{ github.sha }}
48+
draft: true
49+
prerelease: false
50+
51+
- name: publish to github
52+
uses: actions/upload-release-asset@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4255
with:
43-
files: rmdup_${{github.ref_name}}.zip
56+
upload_url: ${{ steps.create_release.outputs.upload_url }}
57+
asset_path: rmdup_${{github.sha}}.zip
58+
asset_name: rmdup_${{github.sha}}.zip
59+
asset_content_type: application/zip

0 commit comments

Comments
 (0)