AppCenterDistribute@3 - App Center 散發 v3 工作

使用此工作,透過 Visual Studio App Center 將應用程式組建散發給測試人員和使用者。

Syntax

# App Center distribute v3
# Distribute app builds to testers and users via Visual Studio App Center.
- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: # string. Required. App Center service connection. 
    appSlug: # string. Required. App slug. 
    appFile: # string. Alias: app. Required. Binary file path. 
    #buildVersion: # string. Build version. 
    releaseNotesOption: 'input' # 'input' | 'file'. Alias: releaseNotesSelection. Required. Create release notes. Default: input.
    releaseNotesInput: # string. Required when releaseNotesSelection = input. Release notes. 
    #releaseNotesFile: # string. Required when releaseNotesSelection = file. Release notes file. 
    #isMandatory: false # boolean. Require users to update to this release. Default: false.
    destinationType: 'groups' # 'groups' | 'store'. Required. Release destination. Default: groups.
    #distributionGroupId: # string. Alias: destinationGroupIds. Optional. Use when destinationType = groups. Destination IDs. 
    #destinationStoreId: # string. Required when destinationType = store. Destination ID. 
    #isSilent: # boolean. Optional. Use when destinationType = groups. Do not notify testers. Release will still be available to install. 
  # Symbols
    #symbolsOption: 'Apple' # 'Apple' | 'Android' | 'UWP'. Alias: symbolsType. Symbols type. Default: Apple.
    #symbolsPath: # string. Optional. Use when symbolsType == AndroidNative || symbolsType = Windows. Symbols path. 
    #appxsymPath: # string. Optional. Use when symbolsType = UWP. Symbols path (*.appxsym). 
    #symbolsDsymFiles: # string. Alias: dsymPath. Optional. Use when symbolsType = Apple. dSYM path. 
    #symbolsMappingTxtFile: # string. Alias: mappingTxtPath. Optional. Use when symbolsType = Android. Mapping file. 
    #nativeLibrariesPath: # string. Optional. Use when symbolsType == Android. Native Library File Path. 
    #symbolsIncludeParentDirectory: # boolean. Alias: packParentFolder. Optional. Use when symbolsType = Apple. Include all items in parent folder.
# App Center distribute v3
# Distribute app builds to testers and users via Visual Studio App Center.
- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: # string. Required. App Center service connection. 
    appSlug: # string. Required. App slug. 
    appFile: # string. Alias: app. Required. Binary file path. 
    releaseNotesOption: 'input' # 'input' | 'file'. Alias: releaseNotesSelection. Required. Create release notes. Default: input.
    releaseNotesInput: # string. Required when releaseNotesSelection = input. Release notes. 
    #releaseNotesFile: # string. Required when releaseNotesSelection = file. Release notes file. 
    #isMandatory: false # boolean. Require users to update to this release. Default: false.
    destinationType: 'groups' # 'groups' | 'store'. Required. Release destination. Default: groups.
    #distributionGroupId: # string. Alias: destinationGroupIds. Optional. Use when destinationType = groups. Destination IDs. 
    #destinationStoreId: # string. Required when destinationType = store. Destination ID. 
    #isSilent: # boolean. Optional. Use when destinationType = groups. Do not notify testers. Release will still be available to install. 
  # Symbols
    #symbolsOption: 'Apple' # 'Apple' | 'Android'. Alias: symbolsType. Symbols type. Default: Apple.
    #symbolsPath: # string. Optional. Use when symbolsType == AndroidNative || symbolsType = Windows. Symbols path. 
    #symbolsPdbFiles: '**/*.pdb' # string. Alias: pdbPath. Optional. Use when symbolsType = UWP. Symbols path (*.pdb). Default: **/*.pdb.
    #symbolsDsymFiles: # string. Alias: dsymPath. Optional. Use when symbolsType = Apple. dSYM path. 
    #symbolsMappingTxtFile: # string. Alias: mappingTxtPath. Optional. Use when symbolsType = Android. Mapping file. 
    #symbolsIncludeParentDirectory: # boolean. Alias: packParentFolder. Optional. Use when symbolsType = Apple. Include all items in parent folder.

輸入

serverEndpoint - App Center 服務連線
string. 必要。

選取 Visual Studio App Center 的服務連線。 若要建立一個,請按一下 Manage 連結並建立新的服務連線。


appSlug - 應用程式 slug
string. 必要。

應用程式 slug 的格式 {username}/{app_identifier} 為 。 若要尋找並 {app_identifier} 尋找 {username} 應用程式,請從App Center按一下其名稱,產生的 URL 格式 https://appcenter.ms/users/**{username}**/apps/**{app_identifier}** 為 。 如果您使用組織,應用程式 slug 的格式 {orgname}/{app_identifier} 為 。


appFile - 二進位檔案路徑
輸入別名: appstring. 必要。

從存放庫根目錄到您要發佈的 APK/AAB 或 IPA 檔案的相對路徑。


buildVersion - 組建版本
string.

上傳二進位檔的組建版本,必須針對 .zip.msi 指定。 除非平臺是 WPF 或 WinForms,否則將會忽略此值。


symbolsOption - 符號類型
輸入別名: symbolsTypestring. 允許值:AppleAndroidUWP。 預設值:Apple

包含符號檔,可接收 App Center 診斷中的符號堆疊追蹤。


symbolsOption - 符號類型
輸入別名: symbolsTypestring. 允許值:AppleAndroid。 預設值:Apple

包含符號檔,可接收 App Center 診斷中的符號堆疊追蹤。


symbolsPath - 符號路徑
string. 選擇性。 使用 時 symbolsType == AndroidNative || symbolsType = Windows

從存放庫根目錄到符號資料夾的相對路徑。


appxsymPath - 符號路徑 (*.appxsym)
string. 選擇性。 使用 時 symbolsType = UWP

APPXSYM 符號檔的相對路徑。 路徑可能包含 萬用字元


symbolsDsymFiles - dSYM 路徑
輸入別名: dsymPathstring. 選擇性。 使用 時 symbolsType = Apple

從存放庫根目錄到 dSYM 資料夾的相對路徑。 路徑可能包含 萬用字元


symbolsMappingTxtFile - 對應檔案
輸入別名: mappingTxtPathstring. 選擇性。 使用 時 symbolsType = Android

從存放庫根目錄到 Android 檔案的 mapping.txt 相對路徑。


nativeLibrariesPath - 原生程式庫檔案路徑
string. 選擇性。 使用 時 symbolsType == Android

從存放庫根目錄到您想要發佈之其他原生程式庫的相對路徑 (,例如 .so 檔案) 。


symbolsIncludeParentDirectory - 在父資料夾中包含所有專案
輸入別名: packParentFolderboolean. 選擇性。 使用 時 symbolsType = Apple

上傳選取的符號檔案或資料夾,以及相同父資料夾內所有其他專案。 這是React Native應用程式的必要專案。


releaseNotesOption - 建立版本資訊
輸入別名: releaseNotesSelectionstring. 必要。 允許的值: input (輸入版本資訊) , file (選取版本資訊檔案) 。 預設值:input

版本資訊會附加至版本,並顯示在安裝頁面上的測試人員。


releaseNotesInput - 版本資訊
string. 當 releaseNotesSelection = input 時為必要。

此版本的版本資訊。


releaseNotesFile - 版本資訊檔案
string. 當 releaseNotesSelection = file 時為必要。

選取 UTF-8 編碼文字檔,其中包含此版本的版本資訊。


isMandatory - 要求使用者更新此版本
boolean. 預設值:false

要求更新所需的 App Center 散發 SDK。 系統會自動提示測試人員更新。


destinationType - 發行目的地
string. 必要。 允許值:groupsstore。 預設值:groups

每個版本都會散發至群組或存放區。


distributionGroupId - 目的地識別碼
輸入別名: destinationGroupIdsstring. 選擇性。 使用 時 destinationType = groups

將接收組建版本的通訊群組識別碼。 將它保留空白以使用預設群組,並使用逗號或分號分隔多個識別符。


destinationStoreId - 目的地識別碼
string. 當 destinationType = store 時為必要。

將接收組建版本的散發存放區識別碼。


isSilent - 請勿通知測試人員。版本仍可供安裝。
boolean. 選擇性。 使用 時 destinationType = groups

測試人員不會收到新版本的電子郵件。


symbolsPdbFiles - 符號路徑 (*.pdb)
輸入別名: pdbPathstring. 選擇性。 使用 時 symbolsType = UWP 。 預設值:**/*.pdb

從存放庫根目錄到 PDB 符號檔案的相對路徑。 路徑可能包含 萬用字元


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控制項選項和一般工作屬性

輸出變數

無。

備註

使用此工作,透過 App Center 將應用程式組建散發給測試人員和使用者。

範例

此範例管線會建置 Android 應用程式、執行測試,以及使用 App Center Distribute 發佈應用程式。

# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/ecosystems/android

pool:
  vmImage: 'macOS-latest'
steps:

- script: sudo npm install -g appcenter-cli
- script: appcenter login --token {YOUR_TOKEN}

- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: build

- task: CopyFiles@2
  inputs:
    contents: '**/*.apk'
    targetFolder: '$(build.artifactStagingDirectory)'

- task: PublishBuildArtifacts@1
  inputs:
    pathToPublish: '$(build.artifactStagingDirectory)'
    artifactName: 'outputs'
    artifactType: 'container'

# Run tests using the App Center CLI
- script: appcenter test run espresso --app "{APP_CENTER_SLUG}" --devices "{DEVICE}" --app-path {APP_FILE} --test-series "master" --locale "en_US" --build-dir {PAT_ESPRESSO} --debug

# Distribute the app
- task: AppCenterDistribute@3
  inputs:
    serverEndpoint: 'AppCenter'
    appSlug: '$(APP_CENTER_SLUG)'
    appFile: '$(APP_FILE)' # Relative path from the repo root to the APK or IPA file you want to publish
    symbolsOption: 'Android'
    releaseNotesOption: 'input'
    releaseNotesInput: 'Here are the release notes for this version.'
    destinationType: 'groups'

規格需求

需求 描述
管線類型 YAML、傳統組建、傳統版本
執行于 Agent、DeploymentGroup
要求
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
Settable 變數 任何
代理程式版本 2.206.1 或更新版本
工作類別 部署
需求 描述
管線類型 YAML、傳統組建、傳統版本
執行于 Agent、DeploymentGroup
要求
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
Settable 變數 任何
代理程式版本 2.144.0 或更新版本
工作類別 部署
需求 描述
管線類型 YAML、傳統組建、傳統版本
執行于 Agent、DeploymentGroup
要求
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
Settable 變數 任何
代理程式版本 所有支援的代理程式版本。
工作類別 部署