@@ -12,7 +12,7 @@ permissions:
12
12
contents : write
13
13
14
14
jobs :
15
- publish :
15
+ release :
16
16
# matrix: build on Ubuntu and Windows
17
17
runs-on : ${{ matrix.os }}
18
18
strategy :
@@ -46,32 +46,38 @@ jobs:
46
46
if : runner.os == 'Windows'
47
47
run : Remove-Item artifacts\${{ matrix.rid }}\*.pdb -Force
48
48
49
- - name : Upload build artifact
50
- uses : actions/upload-artifact@v4
51
- with :
52
- name : app-${{ matrix.rid }}
53
- path : artifacts/${{ matrix.rid }}
49
+ - name : Zip artifact (Linux)
50
+ if : runner.os == 'Linux'
51
+ run : |
52
+ cd artifacts
53
+ zip -r ${{ matrix.rid }}.zip ${{ matrix.rid }}
54
+
55
+ - name : Zip artifact (Windows)
56
+ if : runner.os == 'Windows'
57
+ shell : powershell
58
+ run : |
59
+ Compress-Archive -Path artifacts\${{ matrix.rid }}\* `
60
+ -DestinationPath artifacts\${{ matrix.rid }}.zip
54
61
55
62
- name : Create GitHub Release
56
63
id : create_release
57
64
uses : actions/create-release@v1
58
65
env :
59
66
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
67
with :
61
- # also explicitly pass it in:
62
- token : ${{ secrets.GITHUB_TOKEN }}
63
- tag_name : ${{ github.ref_name }}
68
+ tag_name : ${{ github.ref_name }}
64
69
release_name : Release ${{ github.ref_name }}
65
- body_path : CHANGELOG.md
66
- draft : false
67
- prerelease : false
70
+ body_path : CHANGELOG.md
71
+ draft : false
72
+ prerelease : false
68
73
69
- - name : Upload Release Assets
74
+ # 2) Upload that single ZIP file
75
+ - name : Upload Release Asset (${{ matrix.rid }})
70
76
uses : actions/upload-release-asset@v1
71
77
env :
72
78
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73
79
with :
74
- upload_url : ${{ steps.create_release.outputs.upload_url }}
75
- asset_path : artifacts/${{ matrix.rid }}/**
76
- asset_name : ' ${{ matrix.rid }}-build.zip'
80
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
81
+ asset_path : artifacts/${{ matrix.rid }}.zip
82
+ asset_name : ${{ matrix.rid }}-build.zip
77
83
asset_content_type : application/zip
0 commit comments