From d13b7c559cf5e3f5ff936d9ff0387771978dc0be Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:31:29 -0400 Subject: [PATCH 1/6] add output path to build command --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ec33b9..2cbe47c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "license": "MIT", "private": true, "scripts": { - "build": "npx webpack" + "build": "npx webpack --mode production --output-path ./dist" }, "dependencies": { "buffer": "^6.0.3", From 113cd411840c51875878c6682d35e99c1454ead2 Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:35:39 -0400 Subject: [PATCH 2/6] add GH Action step to actually upload /dist folder artifact --- .github/workflows/webpack.yml | 45 ++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 9626ff6..4a13c8a 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -1,28 +1,35 @@ name: NodeJS with Webpack on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + push: + branches: ["main"] + pull_request: + branches: ["main"] jobs: - build: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Build - run: | - npm install - npx webpack + - name: Build + run: | + npm install + npx webpack + + # Upload the dist folder as an artifact if needed for subsequent jobs or storage + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: dist-folder + path: dist/ From e28f09c96efdeb3b8313ec7b9ad5a6fc30e4b5e1 Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:42:33 -0400 Subject: [PATCH 3/6] Trying to add 'dist' building workflow --- .github/workflows/webpack.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 4a13c8a..c9d1471 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -25,7 +25,7 @@ jobs: - name: Build run: | npm install - npx webpack + npx run build # Upload the dist folder as an artifact if needed for subsequent jobs or storage - name: Upload build artifact @@ -33,3 +33,13 @@ jobs: with: name: dist-folder path: dist/ + + # create a zip file of the dist folder for easier download + - name: Zip dist folder + run: zip -r typex.zip dist/ + + - name: Upload dist.zip as artifact + uses: actions/upload-artifact@v4 + with: + name: dist-zip + path: typex.zip From bf9a8d4e076e7fc6bc3f8fb792eff1c8241decf3 Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:48:52 -0400 Subject: [PATCH 4/6] try again --- .github/workflows/webpack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index c9d1471..fe0dec3 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [22.x] steps: - uses: actions/checkout@v4 @@ -25,7 +25,7 @@ jobs: - name: Build run: | npm install - npx run build + npx webpack --mode production --output-path ./dist # Upload the dist folder as an artifact if needed for subsequent jobs or storage - name: Upload build artifact From d70cf78839521aa6473936e651914f6c3f442dc6 Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:56:26 -0400 Subject: [PATCH 5/6] simplify dist upload workflow --- .github/workflows/webpack.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index fe0dec3..f231bfc 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -31,15 +31,5 @@ jobs: - name: Upload build artifact uses: actions/upload-artifact@v4 with: - name: dist-folder + name: typex-extension path: dist/ - - # create a zip file of the dist folder for easier download - - name: Zip dist folder - run: zip -r typex.zip dist/ - - - name: Upload dist.zip as artifact - uses: actions/upload-artifact@v4 - with: - name: dist-zip - path: typex.zip From 2c7e226f523eb08421a0c59db4077104a6317ad1 Mon Sep 17 00:00:00 2001 From: Stephen Nixon <45946693+arrowtype@users.noreply.github.com> Date: Mon, 22 Sep 2025 22:03:00 -0400 Subject: [PATCH 6/6] git ignore local dist folder --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 931b2e6..2d2a83f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ venv node_modules todo.md + +# this should be downloaded from the repo Releases, or built locally +dist \ No newline at end of file