Skip to content

Commit 245dbba

Browse files
committed
fix upload release asserts
1 parent 09551db commit 245dbba

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,16 @@ jobs:
5353
5454
- name: Package binary into a ZIP file
5555
run: |
56-
zip another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}
56+
zip -j another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}
57+
58+
- name: List generated files
59+
run: ls -lh another-redis-benchmark-*.zip
5760

5861
- name: Upload ZIP artifact
5962
uses: actions/upload-artifact@v4
6063
with:
61-
name: another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip
62-
path: ./another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip
64+
name: another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}
65+
path: another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip
6366

6467
release:
6568
needs:
@@ -72,6 +75,10 @@ jobs:
7275

7376
- name: Download all artifacts
7477
uses: actions/download-artifact@v4
78+
with:
79+
pattern: another-redis-benchmark-*
80+
path: my-artifact
81+
merge-multiple: true
7582

7683
- name: Create GitHub Release
7784
id: create_release
@@ -84,12 +91,14 @@ jobs:
8491
body: ${{ needs.version.outputs.changelog }}
8592
generateReleaseNotes: true
8693

94+
- name: List downloaded files
95+
run: ls -lh my-artifact
96+
8797
- name: Upload all release artifacts
88-
uses: actions/upload-release-asset@v1
89-
with:
90-
upload_url: ${{ steps.create_release.outputs.upload_url }}
91-
asset_path: another-redis-benchmark-*.zip
92-
asset_name: another-redis-benchmark-${{ matrix.goos }}-${{ matrix.goarch }}.zip
93-
asset_content_type: application/zip
98+
run: |
99+
for file in ./my-artifact/*.zip; do
100+
echo "Uploading $file"
101+
gh release upload ${{ needs.version.outputs.app_version }} "$file"
102+
done
94103
env:
95104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)