cli/acceptance/testdata/release/release-upload-download.txtar
2024-10-17 16:06:14 +02:00

26 lines
742 B
Text

# Create a repository with a file so it has a default branch
exec gh repo create $ORG/$SCRIPT_NAME-$RANDOM_STRING --add-readme --private
# Defer repo cleanup
defer gh repo delete --yes $ORG/$SCRIPT_NAME-$RANDOM_STRING
# Clone the repo
exec gh repo clone $ORG/$SCRIPT_NAME-$RANDOM_STRING
# Create a release in the repo
cd $SCRIPT_NAME-$RANDOM_STRING
exec gh release create v1.2.3 --notes 'awesome release' --latest
# Upload an asset to the release
exec gh release upload v1.2.3 ../asset.txt
# Download the asset from the release
exec gh release download v1.2.3
exists asset.txt
# Download the asset in archive form
exec gh release download v1.2.3 --archive=zip
exists $SCRIPT_NAME-$RANDOM_STRING-1.2.3.zip
-- asset.txt --
Hello, world!