Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed May 14, 2024
1 parent 0b88c90 commit 06602b3
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: vsm-deploy

permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Azure login
uses: azure/login@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
client-id: '3731ab8b-c8ea-4d0c-99c1-e75a8c88fd72'
tenant-id: '72f988bf-86f1-41af-91ab-2d7cd011db47'
allow-no-subscriptions: true

- name: fetch user id
run: |
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 --azure-credential
- name: Compile
run: npm run compile

Expand All @@ -64,6 +44,35 @@ jobs:
fstar-language-server-*.js
if-no-files-found: error

deploy:
needs: build
runs-on: ubuntu-latest
environment: vsm-deploy

permissions:
id-token: write

needs:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Download artifact from build job
uses: actions/download-artifact@v4

- name: Azure workload identity federation login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
allow-no-subscriptions: true

- run: npx vsce verify-pat --azure-credential

- run: ls

- name: Upload extension to github release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
Expand All @@ -78,6 +87,4 @@ jobs:
- name: Publish packaged extension
if: startsWith(github.ref, 'refs/tags/v')
run: |
npx vsce publish -i *.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
npx vsce publish --azure-credential -i *.vsix

0 comments on commit 06602b3

Please sign in to comment.