From bcdcc40302775c31333530b7ff0bec791d73525a Mon Sep 17 00:00:00 2001 From: puria Date: Wed, 15 May 2024 19:40:17 +0700 Subject: [PATCH] refactor(ga): reuse setup steps between jobs --- .github/actions/setup/action.yml | 20 ++++++++++++++++++++ .github/workflows/ci.yml | 12 ++---------- 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .github/actions/setup/action.yml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..e960648 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,20 @@ +name: setup +description: "Setup bun and dependencies" +runs: + using: "composite" + steps: + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: setup bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: install parallel + shell: bash + run: brew install parallel + if: runner.os == 'macOS' + - name: install dependencies + run: bun i + shell: bash \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07c4791..2279cae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,15 +26,7 @@ jobs: # - os: windows-latest # architecture: arm64 steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - run: brew install parallel - if: runner.os == 'macOS' - - run: bun i + - uses: ./.github/actions/setup - run: make tests release: @@ -47,7 +39,7 @@ jobs: pull-requests: write id-token: write steps: - - uses: dyne/pnpm@v1 + - uses: ./.github/actions/setup - run: make all - run: pnpm semantic-release env: