Skip to content

Commit

Permalink
[ci] Use two passes for checksum extraction
Browse files Browse the repository at this point in the history
It really hurts that Actions doesn't have string splitting
  • Loading branch information
frozencemetery committed Jul 7, 2020
1 parent 274886c commit 15988d2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,21 @@
},
},
{
"name": "Ugh",
"id": "ugh",
"run": "echo \"::set-output name=basename::`ls tag_build/*.tar.gz | awk -F/ '{print $2}'`\""
"id": "tarball",
"run": "echo \"::set-output name=tarball::`ls tag_build/*.tar.gz | awk -F/ '{print $2}'`\""
},
{
"id": "checksum",
"run": "echo \"::set-output name=checksum::`ls tag_build/*.sha512sum | awk -F/ '{print $2}'`\""
},
{
"name": "Upload release tarball",
"uses": "actions/upload-release-asset@v1",
"env": { "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" },
"with": {
"upload_url": "${{ steps.cr.outputs.upload_url }}",
"asset_path": "tag_build/${{ steps.ugh.outputs.basename }}",
"asset_name": "${{ steps.ugh.outputs.basename }}",
"asset_path": "tag_build/${{ steps.tarball.outputs.tarball }}",
"asset_name": "${{ steps.tarball.outputs.tarball }}",
"asset_content_type": "application/octet-stream",
},
},
Expand All @@ -64,8 +67,8 @@
"env": { "GITHUB_TOKEN": "${{ secrets.GITHUB_TOKEN }}" },
"with": {
"upload_url": "${{ steps.cr.outputs.upload_url }}",
"asset_path": "tag_build/${{ steps.ugh.outputs.basename }}.sha512sum",
"asset_name": "${{ steps.ugh.outputs.basename }}.sha512sum",
"asset_path": "tag_build/${{ steps.checksum.outputs.checksum }}",
"asset_name": "${{ steps.checksum.outputs.checksum }}",
"asset_content_type": "text/plain",
},
},
Expand Down

0 comments on commit 15988d2

Please sign in to comment.