Create Publish-Bash-Android.yml

This commit is contained in:
Wiesław Šoltés 2023-04-06 10:09:24 +02:00 коммит произвёл GitHub
Родитель 5649e13a05
Коммит 4ed4bbcf38
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 55 добавлений и 0 удалений

55
Publish-Bash-Android.yml Normal file
Просмотреть файл

@ -0,0 +1,55 @@
parameters:
- name: name
default: Publish_Bash_Android
- name: vmImage
default: ''
- name: BuildConfiguration
default: ''
- name: PublishFramework
default: ''
- name: PublishProject
default: ''
- name: PublishRuntime
default: ''
- name: Workloads
default: ''
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
BuildConfiguration: ${{ parameters.BuildConfiguration }}
PublishFramework: ${{ parameters.PublishFramework }}
PublishProject: ${{ parameters.PublishProject }}
PublishRuntime: ${{ parameters.PublishRuntime }}
Workloads: ${{ parameters.Workloads }}
steps:
- task: UseDotNet@2
displayName: Install .NET Core SDK
inputs:
useGlobalJson: true
- task: DotNetCoreCLI@2
condition: ne(variables.Workloads, '')
displayName: Install workloads
inputs:
command: 'custom'
custom: 'workload'
arguments: 'install $(Workloads)'
- task: Bash@3
displayName: Nuke Target Publish
inputs:
targetType: filePath
filePath: ./build.sh
arguments: --target Publish --configuration "$(BuildConfiguration)" --version-suffix "build$(Build.BuildNumber)" --publish-runtime "$(PublishRuntime)" --publish-framework "$(PublishFramework)" --publish-project "$(PublishProject)"
- task: CmdLine@2
displayName: 'Copy APK'
inputs:
script: |
mkdir ./artifacts/Publish/Apk
cp ./artifacts/Publish/$(PublishProject)-$(PublishFramework)-$(PublishRuntime)/*.apk ./artifacts/Publish/Apk
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
PathtoPublish: ./artifacts/Publish/Apk
ArtifactName: Publish