Skip to content

Commit

Permalink
feat: export firebase links to GH outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Oct 1, 2023
1 parent de0ddbe commit 344aa66
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o pipefail

# Required since https://github.blog/2022-04-12-git-security-vulnerability-announced
git config --global --add safe.directory $GITHUB_WORKSPACE

Expand Down Expand Up @@ -41,4 +43,20 @@ firebase \
--testers "$INPUT_TESTERS" \
${RELEASE_NOTES:+ --release-notes "${RELEASE_NOTES}"} \
${INPUT_RELEASENOTESFILE:+ --release-notes-file "${RELEASE_NOTES_FILE}"} \
$( (( $INPUT_DEBUG )) && printf %s '--debug' )
$( (( $INPUT_DEBUG )) && printf %s '--debug' ) |
{
while read -r line; do
echo $line

if [[ $line == *"View this release in the Firebase console"* ]]; then
CONSOLE_URI=$(echo "$line" | sed -e 's/.*: //' -e 's/^ *//;s/ *$//')
echo "FIREBASE_CONSOLE_URI=$CONSOLE_URI" >>"$GITHUB_OUTPUT"
elif [[ $line == *"Share this release with testers who have access"* ]]; then
TESTING_URI=$(echo "$line" | sed -e 's/.*: //' -e 's/^ *//;s/ *$//')
echo "TESTING_URI=$TESTING_URI" >>"$GITHUB_OUTPUT"
elif [[ $line == *"Download the release binary"* ]]; then
BINARY_URI=$(echo "$line" | sed -e 's/.*: //' -e 's/^ *//;s/ *$//')
echo "BINARY_DOWNLOAD_URI=$BINARY_URI" >>"$GITHUB_OUTPUT"
fi
done
}

0 comments on commit 344aa66

Please sign in to comment.