1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-28 12:35:40 +01:00
bitwarden-desktop/.az-pipelines/sign-windows-artifacts.yml

59 lines
2.1 KiB
YAML
Raw Normal View History

2020-12-14 22:51:53 +01:00
trigger: none
pool:
vmImage: 'windows-latest'
2020-12-17 00:16:30 +01:00
variables:
- group: code-signing-test
2020-12-14 22:51:53 +01:00
steps:
2020-12-31 19:12:15 +01:00
#- script: |
# set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
# dotnet tool install --global AzureSignTool --version 2.0.17
2020-12-29 17:21:26 +01:00
# displayName: 'install AzureSignTool'
2020-12-31 19:12:15 +01:00
2020-12-29 17:21:26 +01:00
- script: |
2020-12-31 19:12:15 +01:00
git clone https://github.com/vcsjones/AzureSignTool.git
2020-12-31 19:17:27 +01:00
cd AzureSignTool
dotnet --version
dotnet pack --output ./nupkg
dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version 0.0.0-gce87e84a58 azuresigntool
2020-12-31 19:12:15 +01:00
displayName: 'Install AST'
2020-12-16 20:14:06 +01:00
- script: |
2020-12-31 21:00:29 +01:00
azuresigntool sign --help
2020-12-17 00:10:35 +01:00
displayName: 'Debugging AST'
2020-12-31 22:50:33 +01:00
#- script: exit 1
# displayName: 'Early Exit'
2020-12-31 19:12:15 +01:00
2020-12-14 22:51:53 +01:00
- task: DownloadGitHubRelease@0
inputs:
2020-12-14 23:20:39 +01:00
connection: joseph-flinn
userRepository: joseph-flinn/desktop
displayName: 'git release artifacts'
2020-12-14 22:51:53 +01:00
- bash: |
GIT_RELEASE_VERSION=$(curl --silent "https://api.github.com/repos/joseph-flinn/desktop/releases/latest" | awk -F '"' '/tag_name/{print $4}' | awk '{print substr($1, 2); }')
echo "##vso[task.setvariable variable=git_release_version]$GIT_RELEASE_VERSION"
2020-12-16 21:04:08 +01:00
displayName: 'set git_release_version'
2020-12-16 21:24:48 +01:00
- script: |
2020-12-16 20:14:06 +01:00
ls -alh $(System.ArtifactsDirectory)
2020-12-16 21:10:20 +01:00
echo GIT_RELEASE_VERSION=$(git_release_version)
2020-12-16 20:14:06 +01:00
displayName: 'show artifacts'
2020-12-29 18:35:05 +01:00
- script: |
2020-12-31 20:48:23 +01:00
azuresigntool sign -kvu "$(SigningVaultURL)" -kvi "$(SigningClientId)" -kvt "$(SigningTenantId)" -kvs "$(SigningClientSecret)" -kvc "$(SigningCertName)" -tr http://timestamp.digicert.com "$(System.ArtifactsDirectory)\Bitwarden-$(git_release_version)-ia32-store.appx" "$(System.ArtifactsDirectory)\Bitwarden-$(git_release_version)-x64-store.appx"
2020-12-29 21:04:15 +01:00
displayName: 'Sign artifacts'
2020-12-16 23:03:54 +01:00
2020-12-16 23:05:15 +01:00
- task: PublishPipelineArtifact@1
2020-12-16 23:03:54 +01:00
inputs:
2020-12-29 23:48:35 +01:00
pathToPublish: '$(System.ArtifactsDirectory)/Bitwarden-$(git_release_version)-ia32-store.appx'
2020-12-29 21:04:15 +01:00
artifactName: 'Bitwarden-$(git_release_version)-ia32-store.appx'
2020-12-16 23:03:54 +01:00
2020-12-16 23:05:15 +01:00
- task: PublishPipelineArtifact@1
2020-12-16 23:03:54 +01:00
inputs:
2020-12-29 23:48:35 +01:00
pathToPublish: '$(System.ArtifactsDirectory)/Bitwarden-$(git_release_version)-x64-store.appx'
2020-12-29 21:04:15 +01:00
artifactName: 'Bitwarden-$(git_release_version)-x64-store.appx'