Build #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
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 glob-exec | |
run: npm install -g glob-exec | |
- name: Install tsc | |
run: npm install -g [email protected] | |
- name: Install dependencies | |
run: npm run initdev | |
- 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 --output-path extension.vsix | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vsix | |
path: extension.vsix | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
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 content of download-path folder | |
run: ls ${{ steps.download.outputs.download-path }} | |
- name: Unpack artifact | |
run: unzip ${{ format('{0}/{1}', steps.download.outputs.download-path, 'vsix.zip') }} -d ${{ 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 ${{ format('{0}/{1}', steps.download.outputs.download-path, 'extension.vsix') }} |