Build #11
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: Determine vsix file name | |
id: vsix | |
run: echo "::set-output name=vsix::$(glob-exec \"*.vsix\" -- \"echo {0}\" )" | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vsix | |
path: ${{ steps.vsix.outputs.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: Determine vsix file name | |
id: vsix | |
run: echo "::set-output name=vsix::$(glob-exec \"*.vsix\" -- \"echo {0}\" )" | |
- 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, steps.vsix.outputs.vsix) }} |