Closed roG0d closed 2 years ago
For now, It's working just the beginning of the solution:
workflow_dispatch
that will activate the brew workflow on prql/homebrew-prql
every release.workflow_dispatch
and show a simple testing echoThe version and URL inputs are working fine between workflows:
${{ github.ref }}
enviroment variable which give us the /refs/tags/tag of the release that triggers the workflowThe version and URL tags are commited to prql.rb as expected:
For now, there's a bug on the release.yml that triggers 4 workflows on the prql repo. Even with this bug, update.yml behaves works properly as no change is performed on the prql.rb file.
The SHA256 is a field to be updated too, this has been achieved on commit c830e2a6e5a2bfe2d88c6531e968cd610f462312 The idea for this has been:
${{ needs.edit-tag.outputs.url }}
: wget ${{ needs.edit-tag.outputs.url }}
. It's used ${{ needs.edit-tag.outputs.url }}
. because it doesn´t contains double quotes (necessaries on the formulae field). If not it would result in a scheme error.export SHA=$(shasum -a 256 ${{ needs.edit-tag.outputs.tag }}.tar.gz)
export SHA=$(echo $SHA | cut -f 1 -d ' ')
sed -i "5 s/sha256 .*/sha256 $SHA/" "prql-compiler.rb"
Closing as completed!
Through GitHub Actions, create a workflow that enables to keeps updated the formula with the latest stable release.
The solution would go as:
prql/prql
is made ---> Trigger a workflowon: release
that sends aworkflow_dispatch
.prql/homebrew-prql
---> There's a workflow listening for theworkflow_dispatch
event. this workflow would change the .tar URL and the version from the Formula