From f26c22de2c3ae10aa170342d0a434d6b25bcba7d Mon Sep 17 00:00:00 2001 From: Robson Oliveira dos Santos Date: Sat, 25 May 2024 11:44:18 +0930 Subject: [PATCH] build: fix github actions --- .github/workflows/cd.yaml | 4 +- .github/workflows/ci.yaml | 91 ++++++++++----------------------------- 2 files changed, 24 insertions(+), 71 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index cc96422..5bab901 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -9,7 +9,7 @@ permissions: jobs: cd: - runs-on: macos-12 + runs-on: macos-14 permissions: contents: write issues: write @@ -24,7 +24,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: ${{ env.NODE_VERSION }} + node-version-file: '.nvmrc' cache: 'yarn' - name: Install dependencies diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 57a7ebe..0b27539 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,50 +8,8 @@ env: JAVA_VERSION: 17 jobs: - lint: - runs-on: macos-13 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Lint - run: yarn lint - - build-example: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'yarn' - - - name: Install plugin dependencies - run: yarn install --frozen-lockfile - - - name: Build plugin - run: yarn build - - - name: Install example dependencies - run: yarn install --frozen-lockfile - working-directory: example - - - name: Build example - run: yarn build - working-directory: example - - verify-android: - runs-on: ubuntu-latest + ci: + runs-on: macos-14 steps: - name: Checkout uses: actions/checkout@v4 @@ -61,7 +19,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: ${{ env.NODE_VERSION }} + node-version-file: '.nvmrc' cache: 'yarn' - name: Setup Java @@ -70,41 +28,36 @@ jobs: java-version: ${{ env.JAVA_VERSION }} distribution: 'zulu' - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Verify - run: yarn verify:android - - verify-ios: - runs-on: macos-13 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'yarn' - - name: Set up Xcode - run: sudo xcode-select --switch /Applications/Xcode_14.2.app + run: sudo xcode-select --switch /Applications/Xcode_15.4.app + + - name: Install SwiftLint + run: | + brew install swiftlint - - name: Install dependencies + - name: Install plugin dependencies run: yarn install --frozen-lockfile + - name: Build plugin + run: yarn build + - name: Lint run: yarn lint - name: Verify - run: yarn verify:ios + run: yarn verify + + - name: Install example dependencies + run: yarn install --frozen-lockfile + working-directory: example + + - name: Build example + run: yarn build + working-directory: example create-pr: runs-on: ubuntu-latest - needs: [lint, verify-ios, verify-android, build-example] + needs: [ci] steps: - name: Checkout uses: actions/checkout@v4