Skip to content

Commit

Permalink
Fix Gauge release brew+Github workflows (#2420)
Browse files Browse the repository at this point in the history
* Migrate from deprecated `hub` tool to gh CLI

Signed-off-by: Chad Wilson <chadw@thoughtworks.com>

* Update new Brew formula location

Homebrew formulae were sharded into folders in Homebrew/homebrew-core#139592

Signed-off-by: Chad Wilson <chadw@thoughtworks.com>

---------

Signed-off-by: Chad Wilson <chadw@thoughtworks.com>
  • Loading branch information
chadlwilson authored Oct 26, 2023
1 parent ca33019 commit 77e1343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,8 @@ jobs:
echo -e "Gauge v$GAUGE_VERSION\n\n" > desc.txt
release_description=$(ruby -e "$(curl -sSfL https://github.com/getgauge/gauge/raw/master/build/create_release_text.rb)" getgauge gauge)
echo "$release_description" >> desc.txt
echo "Creating new draft for release v$GAUGE_VERSION"
hub release create -F ./desc.txt "v$GAUGE_VERSION"
rm -rf desc.txt
sleep 10
gh release create --title "Gauge v$GAUGE_VERSION" --notes-file ./desc.txt "v$GAUGE_VERSION" ./gauge-*
echo "---------------------------"
echo "Uploading artifacts"
echo "---------------------------"
for artifact in `ls gauge-*`; do
echo $artifact
hub release edit -m "" -a $artifact v$GAUGE_VERSION
if [ $? -ne 0 ]; then
exit 1
fi
done
pypi-release:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions build/brew/create_brew_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ git branch -D $BRANCH || true
git checkout -b $BRANCH

gem install parser
ruby ../brew_update.rb $GAUGE_VERSION ./Formula/gauge.rb
ruby ../brew_update.rb $GAUGE_VERSION ./Formula/g/gauge.rb

git add ./Formula/gauge.rb
git add ./Formula/g/gauge.rb
git commit -m "gauge $GAUGE_VERSION"
git push -f "https://$HOMEBREW_GITHUB_USER_NAME:$GITHUB_TOKEN@github.com/$HOMEBREW_GITHUB_USER_NAME/homebrew-core.git" "gauge-$GAUGE_VERSION"

Expand Down

0 comments on commit 77e1343

Please sign in to comment.