From d71416c9da2a126b22e13cfa0b35f857488e7bf0 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 3 Mar 2023 23:36:55 +0100 Subject: [PATCH] composite --- .github/action/build/action.yaml | 22 ++++++++++++++++++++++ .github/workflows/test.yaml | 13 ++----------- 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 .github/action/build/action.yaml diff --git a/.github/action/build/action.yaml b/.github/action/build/action.yaml new file mode 100644 index 0000000..0f4d747 --- /dev/null +++ b/.github/action/build/action.yaml @@ -0,0 +1,22 @@ +name: "Build" +description: "Build the project." + +inputs: + +runs: + using: "composite" # This is the magic + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: "pnpm" + registry-url: https://registry.npmjs.org/ + + - run: pnpm install --frozen-lockfile + shell: bash + - run: pnpm run build + shell: bash diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 406c7ac..57a3371 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,15 +13,6 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - with: - version: 7 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "pnpm" - - - run: pnpm install --frozen-lockfile - - run: pnpm run compile + - name: Build + uses: ./.github/actions/build - run: pnpm run test