From 605cc98d2566167412ca99b20cf3dd559a4af7c4 Mon Sep 17 00:00:00 2001 From: Seungyong Yun Date: Sat, 26 Aug 2023 10:34:06 +0900 Subject: [PATCH 1/2] Support AppCenter Download Url to environment variable --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 74968c1..2289886 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -29,6 +29,9 @@ for group in $INPUT_GROUP; do isFirst=false appcenter distribute release --token "$INPUT_TOKEN" --app "$INPUT_APPNAME" --group $group --file "$INPUT_FILE" --release-notes "$RELEASE_NOTES" "${params[@]}" releaseId=$(appcenter distribute releases list --token "$INPUT_TOKEN" --app "$INPUT_APPNAME" | grep ID | tr -s ' ' | cut -f2 -d ' ' | sort -n -r | head -1) + downloadUrl=$(appcenter distribute releases show --token "$INPUT_TOKEN" --app "$INPUT_APPNAME" --release-id "$releaseId" --output json | grep -o '"[^"]*"\s*:\s*"[^"]*"' | grep -E '^"downloadUrl"' | cut -d ':' -f 2,3 | tr -d '"') + + echo "APPCENTER_DOWNLOAD_LINK=$downloadUrl" >> "$GITHUB_ENV" else appcenter distribute releases add-destination --token "$INPUT_TOKEN" -d $group -t group -r $releaseId --app "$INPUT_APPNAME" "${params[@]}" fi From a8d2798bab93ffd766ce73a982618412862e1aa1 Mon Sep 17 00:00:00 2001 From: Seungyong Yun Date: Sat, 26 Aug 2023 10:43:05 +0900 Subject: [PATCH 2/2] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 034db0b..d242e63 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,11 @@ This action uploads artifacts (.apk or .ipa) to Visual Studio App Center. **Required** Artifact to upload (.apk or .ipa) ### `buildVersion` + Build version parameter required for .zip, .msi, .pkg and .dmg files ### buildNumber + Build number parameter required for macOS .pkg and .dmg files ### `releaseNotes` @@ -50,6 +52,14 @@ If set to true, shows useful debug information from the action execution. This action is Docker-based. It means **it can only execute on runners with a Linux operating system**. See Github Actions [documentation](https://docs.github.com/en/actions/creating-actions/about-actions#docker-container-actions) for details. +## Supported Evnvironment Variables + +This action support environment variables for convenience. ([setting-an-environment-variable](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable)) + +| Env Var | Description | +| ------------------------- | ---------------------------------- | +| `APPCENTER_DOWNLOAD_LINK` | URL to download Artifact uploaded. | + ## Sample usage ```