Skip to content

Commit

Permalink
Replacing hub with gh cli (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroon-sheikh authored Oct 19, 2023
1 parent 19a63bd commit 7690848
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/release_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,10 @@ jobs:
- name: release
run: |
cd bin
if [ -z "$version" ]; then
version=$(ls gauge-python* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-python-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//");
version=$(cd bin && ls gauge-python* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-python-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//");
fi
echo "VERSION=$version" >> $GITHUB_ENV
artifacts=()
dir=`pwd`
for i in `ls`; do
artifacts+="$dir/$i "
done
cd ..
echo "---------------------------"
echo "Updating release v$version"
Expand All @@ -56,18 +49,7 @@ jobs:
echo "$release_description" >> desc.txt
echo "Creating new draft for release v$version"
hub release create -F ./desc.txt "v$version"
rm -rf desc.txt
sleep 10
echo "Start uploading assets..."
for i in `ls $artifacts`; do
hub release edit -m "" -a $i "v$version"
if [ $? -ne 0 ];then
exit 1
fi
done
gh release create --title "Gauge Python v${version}" --notes-file ./desc.txt "v${version}" bin/*
- name: 'deployment success'
if: success()
Expand Down

0 comments on commit 7690848

Please sign in to comment.