Skip to content

Commit db686a8

Browse files
authored
Merge pull request #142 from arrowtype/gh-actions-build-to-dist
Get workflow building dist zip under GH Action
2 parents dc54803 + 2c7e226 commit db686a8

3 files changed

Lines changed: 30 additions & 20 deletions

File tree

.github/workflows/webpack.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
name: NodeJS with Webpack
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
10+
build:
11+
runs-on: ubuntu-latest
1212

13-
strategy:
14-
matrix:
15-
node-version: [18.x, 20.x, 22.x]
13+
strategy:
14+
matrix:
15+
node-version: [22.x]
1616

17-
steps:
18-
- uses: actions/checkout@v4
17+
steps:
18+
- uses: actions/checkout@v4
1919

20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: ${{ matrix.node-version }}
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
2424

25-
- name: Build
26-
run: |
27-
npm install
28-
npx webpack
25+
- name: Build
26+
run: |
27+
npm install
28+
npx webpack --mode production --output-path ./dist
29+
30+
# Upload the dist folder as an artifact if needed for subsequent jobs or storage
31+
- name: Upload build artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: typex-extension
35+
path: dist/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
venv
33
node_modules
44
todo.md
5+
6+
# this should be downloaded from the repo Releases, or built locally
7+
dist

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"private": true,
99
"scripts": {
10-
"build": "npx webpack"
10+
"build": "npx webpack --mode production --output-path ./dist"
1111
},
1212
"dependencies": {
1313
"buffer": "^6.0.3",

0 commit comments

Comments
 (0)