diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 0000000..caa7483 --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,19 @@ +description: Prepares the repo for a CI job + +name: Prepare + +runs: + steps: + - name: Setup Node.js + id: setup-node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install Dependencies + id: npm-ci + run: npm ci + shell: bash + + using: composite diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98c534e..7173b92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,20 +17,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - id: checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - id: setup-node - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - cache: npm - - - name: Install Dependencies - id: npm-ci - run: npm ci + - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare - name: Lint id: npm-lint @@ -39,3 +27,19 @@ jobs: - name: Test id: npm-test run: npm run test + + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare + + - name: Build runtime + run: npm run build + + - name: Build plugins + run: npm run build:plugins + + - name: Build styles + run: npm run build:styles-example