-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease-az-pipeline.yml
62 lines (53 loc) · 1.92 KB
/
release-az-pipeline.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
trigger:
branches:
include:
- main
stages:
- stage: updateAndRelease
condition: not(contains(variables['Build.SourceVersionMessage'], '[skip ci]'))
jobs:
- job: setup
pool:
vmImage: 'ubuntu-16.04'
- job: updateAndRelease
steps:
- checkout: self
submodules: true
persistCredentials: true
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
#need a condition to not run if contains skipci
#condition: not(contains(variables['Build.SourceVersionMessage'], '[skip ci]'))
- bash: |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
displayName: Start xvfb
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- bash: |
echo ">>> install all dependencies"
npm install-ci-test
displayName: installing npm
#When main branch is updated and succeeds, we want to update version numer, then release to marketplace
#git push https://{PAT}@dev.azure.com/{organization}/{project}/_git/{repo-name}
#git push https://$(GIT_PAT)@github.com/nhall97/sfdx-oss-snippets-extension.git HEAD:main
- bash: |
git config user.email $(GIT_MAIL)
git config user.name $(GIT_USERNAME)
git checkout main
npm version patch -m "new version: %s [skip ci]. Releasing to marketplace from this tag"
git push origin HEAD:main
git push origin --tags
displayName: npm version patch
env:
ENV_GIT_USER: $(GIT_USERNAME)
ENV_GIT_EMAIL: $(GIT_EMAIL)
- bash: |
echo ">>> Publish"
npm run deployToMarketplace
displayName: Publish new version to Marketplace
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Agent.OS'], 'Linux'))
env:
VSCE_PAT: $(VSCE_PAT)
DISPLAY: ':99.0'