-
Notifications
You must be signed in to change notification settings - Fork 14
/
azure-linux-musl.yml
45 lines (45 loc) · 1.43 KB
/
azure-linux-musl.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
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 120
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
musl:
BUILD: musl
DEPLOY: 1
maxParallel: 5
steps:
- bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}"
displayName: Set TAG variable
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- script: |
docker image build . -t tldr
# https://github.com/moby/moby/issues/34592#issuecomment-331001595
CID=$(docker create tldr)
docker cp ${CID}:/app/tldr .
docker rm ${CID}
echo "musl build"
ls
ls -lh ./tldr
cp ./tldr "${BUILD_BINARIESDIRECTORY}"
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Installation ${{parameters.os}} & Test'
- task: ArchiveFiles@2
inputs:
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveFile: $(Build.ArtifactStagingDirectory)/tldr-musl-linux-$(TAG).tar.gz
verbose: true
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1'))
- task: GithubRelease@0
displayName: Create GitHub Release
inputs:
githubConnection: github.com_psibi
assets: $(Build.ArtifactStagingDirectory)/tldr-musl-linux-$(TAG).tar.gz
assetUploadMode: replace
action: edit
tag: $(TAG)
condition: and(startsWith(variables['TAG'], 'v'), eq(variables['DEPLOY'], '1'))