Skip to content

Commit

Permalink
Add release pipeline for IIS Web App Deployment Using WinRM (#1193)
Browse files Browse the repository at this point in the history
* Add release-iiswebapp.yml

* Updated token name

* Updated trigger for a specific tag
  • Loading branch information
LeftTwixWand committed Sep 18, 2023
1 parent 7c71326 commit b1c77b8
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/release-iiswebapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}

0 comments on commit b1c77b8

Please sign in to comment.