Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: allow releasing to App Store(s) #58

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ This action uploads artifacts (.apk or .ipa) to Visual Studio App Center.

**Required** Distribution group (or multiple groups split by **;** delimiter)

### `appstore`

App Store (or multiple stores split by **;** delimiter)

### `file`

**Required** Artifact to upload (.apk or .ipa)
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
group:
description: "Distribution group"
required: true
appstore:
description: "App Store"
required: false
file:
description: "Artefact to upload (.apk or .ipa)"
required: true
Expand Down
14 changes: 12 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@ fi
for group in $INPUT_GROUP; do
if ${isFirst} ; then
isFirst=false
appcenter distribute release --token "$INPUT_TOKEN" --app "$INPUT_APPNAME" --group $group --file "$INPUT_FILE" --release-notes "$RELEASE_NOTES" "${params[@]}"
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)
else
appcenter distribute releases add-destination --token "$INPUT_TOKEN" -d $group -t group -r $releaseId --app "$INPUT_APPNAME" "${params[@]}"
appcenter distribute releases add-destination --token "$INPUT_TOKEN" -d "$group" -t group -r "$releaseId" --app "$INPUT_APPNAME" "${params[@]}"
fi
done

for appstore in $INPUT_APPSTORE; do
if ${isFirst} ; then
isFirst=false
appcenter distribute release --token "$INPUT_TOKEN" --app "$INPUT_APPNAME" --store "$appstore" --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)
else
appcenter distribute releases add-destination --token "$INPUT_TOKEN" -d "$appstore" -t store -r "$releaseId" --app "$INPUT_APPNAME"
fi
done