Use a full azure pipelines yaml schema #250
Workflow file for this run
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
deploy: | |
# Allow one concurrent deployment | |
concurrency: | |
group: ${{ github.event_name == 'push' && 'pages' || github.run_id }} | |
cancel-in-progress: true | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: ${{ github.event_name == 'push' && 'github-pages' || '' }} | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
env: | |
BASE_URL: https://${{ github.repository_owner }}.github.io${{ github.repository_owner != github.event.repository.name && format('/{0}', github.event.repository.name) || '' }} | |
REPO_NAME: ${{ github.repository_owner != github.event.repository.name && format('{0}-{1}', github.repository_owner, github.event.repository.name) || github.repository_owner }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Build ExpandAzurePipelines | |
run: dotnet publish src/ExpandAzurePipelines -c Release --output out | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Build azure-pipelines-vscode-ext | |
run: | | |
npm install | |
dotnet workload install wasm-tools | |
npm run build | |
node_modules/.bin/vsce pack -o azure-pipelines-vscode-ext.vsix | |
node_modules/.bin/vsce pack --pre-release -o azure-pipelines-vscode-ext-pre-release.vsix | |
working-directory: src/azure-pipelines-vscode-ext | |
- name: Make layout | |
run: | | |
mkdir webapp | |
mv out/wwwroot webapp/ExpandAzurePipelines | |
mkdir -p webapp/azure-pipelines-vscode-ext | |
mv src/azure-pipelines-vscode-ext/build webapp/azure-pipelines-vscode-ext/ | |
mv src/azure-pipelines-vscode-ext/dist webapp/azure-pipelines-vscode-ext/ | |
mv src/azure-pipelines-vscode-ext/package.json webapp/azure-pipelines-vscode-ext/ | |
mv src/azure-pipelines-vscode-ext/*.vsix webapp/azure-pipelines-vscode-ext/ | |
- name: Upload vsix | |
uses: actions/upload-artifact@v3 | |
with: | |
name: azure-pipelines-vscode-ext-pre-release | |
path: webapp/azure-pipelines-vscode-ext/azure-pipelines-vscode-ext-pre-release.vsix | |
- name: Setup Pages | |
if: github.event_name == 'push' | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
if: github.event_name == 'push' | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'webapp' | |
- name: Deploy to GitHub Pages | |
if: github.event_name == 'push' | |
id: deployment | |
uses: actions/deploy-pages@v1 |