Skip to content

Commit 15988d2

Browse files
committedJul 7, 2020
[ci] Use two passes for checksum extraction
It really hurts that Actions doesn't have string splitting
1 parent 274886c commit 15988d2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
 

‎.github/workflows/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,21 @@
4343
},
4444
},
4545
{
46-
"name": "Ugh",
47-
"id": "ugh",
48-
"run": "echo \"::set-output name=basename::`ls tag_build/*.tar.gz | awk -F/ '{print $2}'`\""
46+
"id": "tarball",
47+
"run": "echo \"::set-output name=tarball::`ls tag_build/*.tar.gz | awk -F/ '{print $2}'`\""
48+
},
49+
{
50+
"id": "checksum",
51+
"run": "echo \"::set-output name=checksum::`ls tag_build/*.sha512sum | awk -F/ '{print $2}'`\""
4952
},
5053
{
5154
"name": "Upload release tarball",
5255
"uses": "actions/upload-release-asset@v1",
5356
"env": { "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" },
5457
"with": {
5558
"upload_url": "${{ steps.cr.outputs.upload_url }}",
56-
"asset_path": "tag_build/${{ steps.ugh.outputs.basename }}",
57-
"asset_name": "${{ steps.ugh.outputs.basename }}",
59+
"asset_path": "tag_build/${{ steps.tarball.outputs.tarball }}",
60+
"asset_name": "${{ steps.tarball.outputs.tarball }}",
5861
"asset_content_type": "application/octet-stream",
5962
},
6063
},
@@ -64,8 +67,8 @@
6467
"env": { "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" },
6568
"with": {
6669
"upload_url": "${{ steps.cr.outputs.upload_url }}",
67-
"asset_path": "tag_build/${{ steps.ugh.outputs.basename }}.sha512sum",
68-
"asset_name": "${{ steps.ugh.outputs.basename }}.sha512sum",
70+
"asset_path": "tag_build/${{ steps.checksum.outputs.checksum }}",
71+
"asset_name": "${{ steps.checksum.outputs.checksum }}",
6972
"asset_content_type": "text/plain",
7073
},
7174
},

0 commit comments

Comments
 (0)
Please sign in to comment.