Add cross-version parameter to specify cross version
This commit is contained in:
15
determine-cross-version.sh
Executable file
15
determine-cross-version.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
set -e
|
||||
set -x
|
||||
set -o pipefail
|
||||
|
||||
VERSION=$1
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
JSON=$( curl \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer $GITHUB_TOKEN" \
|
||||
https://api.github.com/repos/cross-rs/cross/releases/latest )
|
||||
VERSION=$( echo "$JSON" | jq -r ".tag_name")
|
||||
fi
|
||||
|
||||
echo "cross-version=$VERSION" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user