Skip to content

Commit e32dcc0

Browse files
committed
wip
1 parent edd4586 commit e32dcc0

5 files changed

Lines changed: 175 additions & 110 deletions

File tree

.github/workflows/build.yml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@ permissions:
88
contents: read
99

1010
jobs:
11+
format:
12+
name: Format
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Lint
28+
run: npx biome ci .
29+
1130
lint:
1231
name: Lint
1332
runs-on: ubuntu-latest
@@ -25,10 +44,10 @@ jobs:
2544
run: npm ci
2645

2746
- name: Lint
28-
run: make lint
47+
run: npx eslint
2948

30-
test:
31-
name: Test
49+
type-check:
50+
name: Type Check
3251
runs-on: ubuntu-latest
3352

3453
steps:
@@ -46,6 +65,23 @@ jobs:
4665
- name: Type check
4766
run: npx tsc
4867

68+
69+
test:
70+
name: Test
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v5
76+
77+
- name: Setup Node
78+
uses: actions/setup-node@v4
79+
with:
80+
cache: npm
81+
82+
- name: Install dependencies
83+
run: npm ci
84+
4985
- name: Compile
5086
run: npx vsce package
5187
env:

.github/workflows/publish.yml

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

.github/workflows/release.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Release
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *' # Every day at 08:00 UTC
6+
workflow_dispatch:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
concurrency:
12+
group: release
13+
cancel-in-progress: false
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
release:
20+
name: Release
21+
if: github.event_name != 'push'
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@v4
33+
with:
34+
cache: npm
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Configure git
40+
run: |
41+
git config user.name "github-actions[bot]"
42+
git config user.email "github-actions[bot]@users.noreply.github.com"
43+
44+
- name: Bump version, update changelog, and tag
45+
run: |
46+
BEFORE=$(node -p "require('./package.json').version")
47+
npx --yes commit-and-tag-version
48+
AFTER=$(node -p "require('./package.json').version")
49+
50+
if [ "$BEFORE" != "$AFTER" ]; then
51+
git push --follow-tags origin main
52+
else
53+
echo "No releasable commits — skipping push"
54+
fi
55+
56+
build:
57+
name: Build
58+
if: startsWith(github.ref, 'refs/tags/v')
59+
runs-on: ubuntu-latest
60+
outputs:
61+
version: ${{ steps.version.outputs.version }}
62+
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v5
66+
67+
- name: Setup Node
68+
uses: actions/setup-node@v4
69+
with:
70+
cache: npm
71+
72+
- name: Install dependencies
73+
run: npm ci
74+
75+
- name: Get version from tag
76+
id: version
77+
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
78+
79+
- name: Build VSIX
80+
run: npx vsce package
81+
env:
82+
LOCALSTACK_WEB_AUTH_REDIRECT: https://app.localstack.cloud/redirect
83+
NODE_ENV: production
84+
ANALYTICS_API_URL: https://analytics.localstack.cloud/v1/events
85+
86+
- name: Upload VSIX artifact
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: vsix
90+
path: "*.vsix"
91+
92+
- name: Create GitHub Release
93+
uses: softprops/action-gh-release@v2
94+
with:
95+
tag_name: ${{ github.ref_name }}
96+
generate_release_notes: true
97+
files: "*.vsix"
98+
99+
publish-vscode-marketplace:
100+
name: Publish to VS Marketplace
101+
runs-on: ubuntu-latest
102+
needs: build
103+
104+
steps:
105+
- name: Download VSIX
106+
uses: actions/download-artifact@v4
107+
with:
108+
name: vsix
109+
110+
- name: Setup Node
111+
uses: actions/setup-node@v4
112+
113+
- name: Publish to VS Marketplace
114+
run: npx @vscode/vsce publish --packagePath localstack-${{ needs.build.outputs.version }}.vsix
115+
env:
116+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
117+
118+
publish-ovsx:
119+
name: Publish to Open VSX
120+
runs-on: ubuntu-latest
121+
needs: build
122+
123+
steps:
124+
- name: Download VSIX
125+
uses: actions/download-artifact@v4
126+
with:
127+
name: vsix
128+
129+
- name: Setup Node
130+
uses: actions/setup-node@v4
131+
132+
- name: Publish to Open VSX
133+
run: npx ovsx publish localstack-${{ needs.build.outputs.version }}.vsix -p $OVSX_PAT
134+
env:
135+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To update the extension after making code changes, you need to regenerate the VS
2626
Run the following command in your project directory:
2727

2828
```sh
29-
make vsix
29+
npx vsce package
3030
```
3131

3232
This will build a new `.vsix` file in the directory (localstack-x.x.1.vsix).

Makefile

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

0 commit comments

Comments
 (0)