update to pwsh syntax #52
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 and test | |
on: | |
push: | |
branches: [develop, main] | |
jobs: | |
build: | |
name: Build, test and pack tasks | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install tfx-cli | |
run: | | |
npm install tfx-cli | |
env: | |
CI: true | |
# Production package | |
- name: run tfx-cli - production version | |
if: ${{ endsWith(github.ref, 'main') }} | |
run: | | |
.\node_modules\.bin\tfx extension create --manifest-globs .\vss-extension.json | |
- name: extract version name - production version | |
if: ${{ endsWith(github.ref, 'main') }} | |
id: extract_version | |
run: | | |
node -e "const v = require('.\\vss-extension.json').version;console.log('version=' + v);" >> $env:GITHUB_OUTPUT | |
- name: store extension - production version | |
if: ${{ endsWith(github.ref, 'main') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: liprec.vsts-release-aas-${{ steps.extract_version.outputs.version }} | |
path: | | |
liprec.vsts-release-aas-${{ steps.extract_version.outputs.version }}.vsix | |
# Preview package | |
- name: run tfx-cli - preview version | |
if: ${{ endsWith(github.ref, 'develop') }} | |
run: | | |
.\node_modules\.bin\tfx extension create --manifest-globs .\vss-extension-preview.json | |
- name: extract version name - preview version | |
if: ${{ endsWith(github.ref, 'develop') }} | |
id: extract_version_preview | |
run: | | |
node -e "const v = require('.\\vss-extension-preview.json').version;console.log('version=' + v);" >> $env:GITHUB_OUTPUT | |
- name: store extension - preview version | |
if: ${{ endsWith(github.ref, 'develop') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: liprec.vsts-release-aas-preview-${{ steps.extract_version_preview.outputs.version }} | |
path: | | |
liprec.vsts-release-aas-preview-${{ steps.extract_version_preview.outputs.version }}.vsix | |