Skip to content

Commit 7513e48

Browse files
split into 2 publish workflows
1 parent 5746fe6 commit 7513e48

File tree

4 files changed

+117
-77
lines changed

4 files changed

+117
-77
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,40 @@ jobs:
4848
env:
4949
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect?name=VSCode
5050
NODE_ENV: ci
51+
52+
build:
53+
name: Build VSIX
54+
runs-on: ubuntu-latest
55+
needs: [lint, test]
56+
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v5
60+
61+
- name: Setup Node
62+
uses: actions/setup-node@v4
63+
with:
64+
cache: npm
65+
66+
- name: Install dependencies
67+
run: npm ci
68+
69+
- name: Set version from branch name
70+
run: |
71+
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
72+
echo "VERSION=$BRANCH_NAME" >> $GITHUB_ENV
73+
echo "Using version: $BRANCH_NAME"
74+
75+
- name: Build VSIX package
76+
run: make vsix
77+
env:
78+
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect?name=VSCode
79+
NODE_ENV: production
80+
ANALYTICS_API_URL: https://analytics.localstack.cloud/v1/events
81+
82+
- name: Upload VSIX artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: vsix-${{ env.VERSION }}
86+
path: localstack-${{ env.VERSION }}.vsix
87+
retention-days: 3

.github/workflows/publish-ovsx.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Open VSX
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to publish (must match a build artifact)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
publish:
16+
name: Publish to Open VSX
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
cache: npm
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Download VSIX artifact
32+
uses: actions/download-artifact@v4
33+
with:
34+
name: vsix-${{ inputs.version }}
35+
36+
- name: Publish to Open VSX
37+
run: make publish-ovsx
38+
env:
39+
VERSION: ${{ inputs.version }}
40+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Visual Studio Marketplace
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to publish (must match a build artifact)'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
publish:
16+
name: Publish to VS Marketplace
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
cache: npm
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Download VSIX artifact
32+
uses: actions/download-artifact@v4
33+
with:
34+
name: vsix-${{ inputs.version }}
35+
36+
- name: Publish to VS Marketplace
37+
run: make publish-marketplace
38+
env:
39+
VERSION: ${{ inputs.version }}
40+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

.github/workflows/publish.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)