-
Notifications
You must be signed in to change notification settings - Fork 425
84 lines (65 loc) · 2.24 KB
/
release-iiswebapp.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Publish IIS Web App Deployment Using WinRM
on:
push:
tags:
- 'iiswebapp-*'
env:
node-version: 10
extension-name: ms-vscs-rm.iiswebapp-${{ github.event.release.tag_name }}.vsix # Tag name is the extension version.
jobs:
build:
name: Build
runs-on: windows-latest
permissions:
contents: write # Permissions to attcach the artifact to release assets.
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }} # Checkout the commit that used in the release.
- name: Install Node.js ${{ env.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- name: Install Node Modules
run: npm install
- name: Install TFX CLI
run: npm install -g tfx-cli
- name: Build with Gulp
run: gulp build
- name: Package with Gulp
run: gulp package
- name: Upload Extension as Release Asset
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: _package/IISWebAppDeploy/${{ env.extension-name }}
asset_name: ${{ env.extension-name }}
asset_content_type: application/octet-stream
- name: Upload Extension as Artifact
uses: actions/upload-artifact@v3
with:
name: IISWebAppDeploy Extension Artifact
path: _package/IISWebAppDeploy/${{ env.extension-name }}
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
uses: actions/download-artifact@v2.1.1
with:
name: IISWebAppDeploy Extension Artifact
path: ./artifacts/extensions/IISWebAppDeploy/
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
- name: Install TFX CLI
run: npm install -g tfx-cli
- name: Publish Extension
run: |
tfx extension publish --vsix ./artifacts/extensions/IISWebAppDeploy/${{ env.extension-name }} \
--service-url https://marketplace.visualstudio.com \
--no-prompt \
--auth-type pat \
--token ${{ secrets.AZURE_DEVOPS_MARKETPLACE_PAT }}