Skip to content

Commit 9a0bff6

Browse files
authored
Merge pull request #3830 from github/koesie10/azure-mi-publishing
Publish extension using Azure credentials
2 parents ea45e38 + d5f3c77 commit 9a0bff6

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ jobs:
124124
needs: build
125125
environment: publish-vscode-marketplace
126126
runs-on: ubuntu-latest
127-
env:
128-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
127+
permissions:
128+
contents: read
129+
id-token: write
129130
steps:
130131
- name: Checkout
131132
uses: actions/checkout@v4
@@ -139,9 +140,19 @@ jobs:
139140
with:
140141
name: vscode-codeql-extension
141142

143+
- name: Azure User-assigned managed identity login
144+
uses: azure/login@v2
145+
with:
146+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
147+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
148+
allow-no-subscriptions: true
149+
142150
- name: Publish to Registry
143-
run: |
144-
npx @vscode/vsce publish -p $VSCE_TOKEN --packagePath *.vsix
151+
uses: azure/cli@v2
152+
with:
153+
azcliversion: latest
154+
inlineScript: |
155+
npx @vscode/vsce publish --azure-credential --packagePath *.vsix
145156
146157
open-vsx-publish:
147158
name: Publish to Open VSX Registry

0 commit comments

Comments
 (0)