From 7b4f2ddfc121c62099a5269439b04be66a469fe7 Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 15:06:35 +0100 Subject: [PATCH 1/2] CI: Adds build step to CI --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..32afc88 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: 'Run tests' + +on: [push, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: + # TODO: add version to a .nvmrc or at least a variable + node-version: 18.12.1 + cache: npm + - name: Install + run: npm ci + - name: Build + run: npm run build From bee10d0031f19985ff3100c157ea7f3ce1c4703b Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 15:16:52 +0100 Subject: [PATCH 2/2] CI: Adds artifact upload to build --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32afc88..4d04c4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,3 +18,9 @@ jobs: run: npm ci - name: Build run: npm run build + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: lib-${{ github.sha }} + path: ./dist + if-no-files-found: error