Skip to content

wip

wip #70

Workflow file for this run

name: build
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
environment: vsm-deploy
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Azure AD Workload Identity Federation
# uses: nicolonsky/[email protected]
# with:
# tenant_id: '72f988bf-86f1-41af-91ab-2d7cd011db47'
# client_id: '3731ab8b-c8ea-4d0c-99c1-e75a8c88fd72'
- name: Azure login
uses: azure/login@v2
with:
client-id: '3731ab8b-c8ea-4d0c-99c1-e75a8c88fd72'
tenant-id: '72f988bf-86f1-41af-91ab-2d7cd011db47'
subscription-id: 'fd87bb83-54ae-426f-834f-21c6ee029ce2'
# - name: fetch user id
# run: |
# az login --identity --username 3731ab8b-c8ea-4d0c-99c1-e75a8c88fd72
# az rest -u https://app.vssps.visualstudio.com/_apis/profile/profiles/me --resource 499b84ac-1321-427f-aa17-267ca6975798
- name: Install dependencies
run: npm install
- name: check vsce
run: |
npx vsce verify-pat
env:
VSCE_PAT: ${{ secrets.ACCESS_TOKEN }}
- name: Compile
run: npm run compile
- name: Lint
run: npm run lint
- name: Server unit tests
run: npm run test
- name: Package
run: npx vsce package
- name: Package LSP server
run: cp server/out/main.js "fstar-language-server-$(jq -r .version package.json).js"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: |
*.vsix
fstar-language-server-*.js
if-no-files-found: error
- name: Upload extension to github release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
*.vsix
fstar-language-server-*.js
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish packaged extension
if: startsWith(github.ref, 'refs/tags/v')
run: |
npx vsce publish -i *.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}