From 31c19fb9a29ae2050925dae1cf4938ba66b71aa4 Mon Sep 17 00:00:00 2001 From: Luca Iachini Date: Fri, 22 Mar 2024 14:52:16 +0100 Subject: [PATCH] create action --- .github/workflows/action/action.yml | 24 ------------------------ .github/workflows/build/action.yml | 19 +++++++++++++++++++ .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 4 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/action/action.yml create mode 100644 .github/workflows/build/action.yml diff --git a/.github/workflows/action/action.yml b/.github/workflows/action/action.yml deleted file mode 100644 index 4057884..0000000 --- a/.github/workflows/action/action.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build - -on: - workflow_call: - -jobs: - build: - name: Build and test - runs-on: ubuntu-latest - steps: - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: yarn - - - name: Install Dependencies - run: yarn --immutable - - - name: Build - run: yarn build - - - name: Test - run: yarn node --experimental-vm-modules $(yarn bin jest) diff --git a/.github/workflows/build/action.yml b/.github/workflows/build/action.yml new file mode 100644 index 0000000..f4e1871 --- /dev/null +++ b/.github/workflows/build/action.yml @@ -0,0 +1,19 @@ +name: Build + +runs: + using: "composite" + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: yarn + + - name: Install Dependencies + run: yarn --immutable + + - name: Build + run: yarn build + + - name: Test + run: yarn node --experimental-vm-modules $(yarn bin jest) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9defc51..8206828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,4 +7,4 @@ jobs: ci: - uses: actions/checkout@v3 - name: Build - uses: ./.github/workflows/action + uses: ./.github/workflows/build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da9a706..7a1bd32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build - uses: ./.github/workflows/action + uses: ./.github/workflows/build - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1