-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (57 loc) · 2.46 KB
/
publish.yml
File metadata and controls
60 lines (57 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
on:
push:
tags:
- "dryrun/[0-9]+.[0-9]+.[0-9]+"
- "release/[0-9]+.[0-9]+.[0-9]+"
name: Deploy Extension
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check for DryRun
id: releaseMode
# perform secret check & put boolean result as an output
shell: bash
env:
GIT_REF: ${{ github.ref }}
run: |
if [[ "$GIT_REF" = "refs/tags/dryrun"* ]]; then
echo "dryRun=true" >> $GITHUB_OUTPUT;
else
echo "dryRun=false" >> $GITHUB_OUTPUT;
fi
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 (2026-05-15)
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 (2026-05-15)
- run: npm ci
- name: Publish to Open VSX Registry
if: success() || failure()
uses: SocketDev/socket-registry/.github/actions/publish-vscode-extension@c14cb59fdba637c16f851013d3307d8721e3eb23 # main (2026-05-15)
id: publishToOpenVSX
with:
dry-run: ${{ steps.releaseMode.outputs.dryRun }}
pat: ${{ secrets.OPEN_VSX_TOKEN }}
pre-release: false
registry-url: https://open-vsx.org/api
skip-duplicate: true
- name: Publish to Visual Studio Marketplace
if: success() || failure()
uses: SocketDev/socket-registry/.github/actions/publish-vscode-extension@c14cb59fdba637c16f851013d3307d8721e3eb23 # main (2026-05-15)
with:
dry-run: ${{ steps.releaseMode.outputs.dryRun }}
extension-file: ${{ steps.publishToOpenVSX.outputs.vsix-path }}
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
pre-release: false
registry-url: https://marketplace.visualstudio.com
skip-duplicate: true
- name: Github Release
uses: SocketDev/socket-registry/.github/actions/create-gh-release@c14cb59fdba637c16f851013d3307d8721e3eb23 # main (2026-05-15)
if: ${{ ! steps.releaseMode.outputs.dryRun }}
with:
body: |
This release is also available on the [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=SocketSecurity.vscode-socket-security) and [OpenVSX Registry](https://open-vsx.org/extension/SocketSecurity/vscode-socket-security).
files: ${{ steps.publishToOpenVSX.outputs.vsix-path }}
pre-release: ${{ steps.releaseMode.outputs.preRelease }}