Skip to content

Commit

Permalink
Create build-and-publish workflow with new extension version
Browse files Browse the repository at this point in the history
  • Loading branch information
FH-Inway committed Jan 13, 2024
1 parent 0e5f926 commit 5b6e85a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and publish

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '10.x'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Install Tfx
run: npm install -g tfx-cli

- name: Package
run: tfx extension create --manifest-globs vss-extension.json

- name: Upload
uses: actions/upload-artifact@v4
with:
name: vsix
path: *.vsix

publish:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '10.x'

- name: Install Tfx
run: npm install -g tfx-cli

- name: Download artifact
id: download
uses: actions/download-artifact@v4
with:
name: vsix

- name: Show download-path
run: echo ${{ steps.download.outputs.download-path }}

- name: Publish to Azure DevOps Marketplace
run: tfx extension publish --auth-type pat --token ${{ secrets.AZURE_DEVOPS_TOKEN }} --extension-id authenticated-lcs-scripts --vsix ${{ steps.download.outputs.download-path }}
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "authenticated-lcs-scripts",
"publisher": "inway-fh",
"version": "0.0.3",
"version": "0.0.4",
"name": "Authenticated LCS Scripts",
"description": "Use a LCS service connection with scripts instead of pasting secrets into variables!",
"categories": [
Expand Down

0 comments on commit 5b6e85a

Please sign in to comment.