From ebac85b5e605d5f0dc2a0d66d4b59adf39e115fa Mon Sep 17 00:00:00 2001 From: Andrew Glago Date: Sun, 10 Nov 2024 11:52:00 +0000 Subject: [PATCH] feat: upgrade workflows --- .github/workflows/dependabot-lock-file.yml | 31 ---------- .github/workflows/lint.yml | 68 +++++++++++----------- .github/workflows/release.yml | 6 +- .github/workflows/test.yml | 6 +- 4 files changed, 41 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/dependabot-lock-file.yml diff --git a/.github/workflows/dependabot-lock-file.yml b/.github/workflows/dependabot-lock-file.yml deleted file mode 100644 index c5e19ef..0000000 --- a/.github/workflows/dependabot-lock-file.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Dependabot is configured to only run on /packages/plugin -# Since the lockfile is at the root of the repo, we need to -# manually update it when Dependabot runs on a PR -name: Dependabot Lockfile Update -on: pull_request_target -permissions: read-all -jobs: - update-lockfile: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - permissions: - pull-requests: write - contents: write - steps: - - uses: pnpm/action-setup@v2 - with: - version: ^8.8.0 - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.ref }} - - run: pnpm i --lockfile-only # Update out of sync lockfile - - run: pnpm i # Install to make manypkg available, catch any other dep errors - - run: pnpm manypkg fix - - run: | - git config --global user.name github-actions[bot] - git config --global user.email github-actions[bot]@users.noreply.github.com - git add pnpm-lock.yaml - git commit -m "Update pnpm-lock.yaml" - git push - git commit -m "Trigger checks" --allow-empty - git push diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 19b91cf..ac42bf3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,12 @@ on: branches: [main] jobs: - packages: - name: Build & Lint + plugin: + name: Build & Lint Plugin runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/plugin steps: - name: Checkout Repo uses: actions/checkout@v3 @@ -17,12 +20,12 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@v2 with: - version: 8.6.11 + version: 9 - - name: Setup Node.js 18 + - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: "pnpm" - name: Install Dependencies @@ -32,39 +35,38 @@ jobs: run: pnpm run build env: NODE_ENV: production - NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY: ci - name: Lint run: pnpm run lint - examples: - name: Build & Lint Examples - runs-on: ubuntu-latest - strategy: - matrix: - directory: [examples/storefront] - defaults: - run: - working-directory: ${{ matrix.directory }} - steps: - - name: Checkout Repo - uses: actions/checkout@v3 + # examples-storefront: + # name: Build & Lint Example Storefront + # runs-on: ubuntu-latest + # strategy: + # matrix: + # directory: [examples/storefront, examples/backend] + # defaults: + # run: + # working-directory: ${{ matrix.directory }} + # steps: + # - name: Checkout Repo + # uses: actions/checkout@v3 - - name: Setup Node.js 18 - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: "yarn" - cache-dependency-path: ${{ matrix.directory }}/yarn.lock + # - name: Setup Node.js 18 + # uses: actions/setup-node@v3 + # with: + # node-version: 18 + # cache: "yarn" + # cache-dependency-path: ${{ matrix.directory }}/yarn.lock - - name: Install Dependencies - run: yarn install --frozen-lockfile + # - name: Install Dependencies + # run: yarn install --frozen-lockfile - - name: Build - run: yarn next experimental-compile # Skip static page generation - env: - NODE_ENV: production - NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY: ci + # - name: Build + # run: yarn next experimental-compile # Skip static page generation + # env: + # NODE_ENV: production + # NEXT_PUBLIC_PAYSTACK_PUBLIC_KEY: ci - - name: Lint - run: yarn lint + # - name: Lint + # run: yarn lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ddced1..d4d539c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,12 +18,12 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@v2 with: - version: 8.6.11 + version: 9 - - name: Setup Node.js 18 + - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: "pnpm" - name: Install Dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be68c40..eed8568 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,12 +17,12 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@v2 with: - version: 8.6.11 + version: 9 - - name: Setup Node.js 18 + - name: Setup Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 cache: "pnpm" - name: Install Dependencies