共用方式為


AppCenterDistribute@3 - App Center 散發 v3 工作

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

語法

# 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.

輸入

serverEndpoint - App Center 服務連線
string。 必須的。

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


appSlug - App slug
string。 必須的。

應用程式 slug 格式為 {username}/{app_identifier}。 若要尋找應用程式的 {username}{app_identifier},請按兩下 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 診斷中接收符號堆疊追蹤。


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 - 版本資訊
stringreleaseNotesSelection = input時為必要項。

此版本的版本資訊。


releaseNotesFile - 版本資訊檔案
stringreleaseNotesSelection = file時為必要項。

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


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

App Center 發佈授權更新所需的 SDK。 系統會自動提示測試人員更新。


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

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


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

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


destinationStoreId - 目的地標識碼
stringdestinationType = store時為必要項。

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


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

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


工作控制選項

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

輸出變數

沒有。

備註

使用此工作,透過 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
需求 沒有
功能 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 2.206.1 或更新
工作類別 部署
要求 說明
管線類型 YAML、傳統組建、傳統版本
執行於 Agent、DeploymentGroup
需求 沒有
功能 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 2.144.0 或更新
工作類別 部署
要求 說明
管線類型 YAML、傳統組建、傳統版本
執行於 Agent、DeploymentGroup
需求 沒有
功能 此工作不符合作業中後續工作的任何需求。
命令限制 任意
Settable 變數 任意
代理程式版本 所有支援的代理程式版本。
工作類別 部署