forked from BSData/wh40k-9e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.azure-pipelines.yml
47 lines (39 loc) · 1.54 KB
/
.azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
batch: 'true'
branches:
include: ['*']
tags:
include: ['*']
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
displayName: 'Use .NET'
inputs:
version: 2.2.x
- script: dotnet tool install --global wham --version 0.6.8-beta-ge10d0437a4
displayName: Install wham
- pwsh: wham publish -v detailed -f snapshot -o $env:BUILD_ARTIFACTSTAGINGDIRECTORY/snapshot
displayName: Build 'snapshot.bsr'
- task: PublishPipelineArtifact@1
displayName: Publish 'snapshot.bsr' artifact
inputs:
artifact: snapshot
targetPath: $(Build.ArtifactStagingDirectory)/snapshot
- pwsh: |
$tag = git tag --points-at HEAD | select -last 1
$reponame = $env:BUILD_REPOSITORY_NAME -split '/' | select -last 1
$urlbase = "https://github.com/$env:BUILD_REPOSITORY_NAME/releases/download/$tag/$reponame"
wham publish -a bsr bsi -f $reponame --url "$urlbase.bsi" --url-only-index --additional-urls "$urlbase.bsr" -o $env:BUILD_ARTIFACTSTAGINGDIRECTORY/gh-release
displayName: Build 'gh-release' artifact
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
- task: PublishPipelineArtifact@1
displayName: Publish 'gh-release' artifact
inputs:
artifact: snapshot
targetPath: $(Build.ArtifactStagingDirectory)/gh-release
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))