From 4b84cceeb948ebdbeb32a458c88cfd1d6c3197b8 Mon Sep 17 00:00:00 2001 From: Pascal Jufer Date: Tue, 6 Aug 2024 12:32:23 +0200 Subject: [PATCH] Rename setup action, isolate build step Co-authored-by: Wryn (yage) Wagner --- .github/actions/{setup-env => setup}/action.yml | 14 ++------------ .github/workflows/autofix.yml | 2 +- .github/workflows/check.yml | 13 +++++++------ .github/workflows/rebuild.yml | 9 +++++---- .github/workflows/release.yml | 9 +++++---- 5 files changed, 20 insertions(+), 27 deletions(-) rename .github/actions/{setup-env => setup}/action.yml (77%) diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup/action.yml similarity index 77% rename from .github/actions/setup-env/action.yml rename to .github/actions/setup/action.yml index 3f14517..657a919 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup/action.yml @@ -1,10 +1,5 @@ -name: Setup env -description: Setup the environment - -inputs: - build: - description: Run the build step - required: false +name: Setup +description: Configure Node.js + pnpm and install dependencies runs: using: composite @@ -37,8 +32,3 @@ runs: - name: Install dependencies shell: bash run: pnpm install - - - name: Build - if: inputs.build == 'true' - shell: bash - run: pnpm run build diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 19b6332..a42d75e 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Setup env - uses: ./.github/actions/setup-env + uses: ./.github/actions/setup - name: Run linter with autofix continue-on-error: true diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b298223..dec1d27 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Setup env - uses: ./.github/actions/setup-env + uses: ./.github/actions/setup - name: Run linter run: pnpm run lint @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v4 - name: Setup env - uses: ./.github/actions/setup-env + uses: ./.github/actions/setup - name: Run typecheck run: pnpm run typecheck @@ -45,10 +45,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup env & build - uses: ./.github/actions/setup-env - with: - build: true + - name: Setup env + uses: ./.github/actions/setup + + - name: Build + run: pnpm run build - name: Run action id: action diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index b7f86ff..ba5f8f5 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -16,10 +16,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup env & build - uses: ./.github/actions/setup-env - with: - build: true + - name: Setup env + uses: ./.github/actions/setup + + - name: Build + run: pnpm run build - name: Commit changes run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a725f33..16e9341 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,10 +35,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup env & build - uses: ./.github/actions/setup-env - with: - build: true + - name: Setup env + uses: ./.github/actions/setup + + - name: Build + run: pnpm run build - name: Update version in readme run: |