diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 9626ff6..f231bfc 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: [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 --mode production --output-path ./dist + + # 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: typex-extension + path: dist/ 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 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",