diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index ed00054..ca207b4 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -39,7 +39,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Restore node_modules from cache uses: actions/cache@v4 id: yarn-cache @@ -83,7 +83,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Restore node_modules from cache uses: actions/cache@v4 id: yarn-cache diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index bbf434d..9c4d499 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -30,7 +30,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Restore node_modules from cache uses: actions/cache@v4 id: yarn-cache @@ -87,7 +87,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Restore node_modules from cache uses: actions/cache@v4 id: yarn-cache diff --git a/.github/workflows/validate-js.yml b/.github/workflows/validate-js.yml index 27b1024..fbd637c 100644 --- a/.github/workflows/validate-js.yml +++ b/.github/workflows/validate-js.yml @@ -36,39 +36,39 @@ jobs: run: working-directory: ./package steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Install reviewdog - uses: reviewdog/action-setup@v1 + - name: Install reviewdog + uses: reviewdog/action-setup@v1 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Restore node_modules from cache - uses: actions/cache@v4 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Restore node_modules from cache + uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - - name: Install node_modules - run: yarn install --frozen-lockfile - - name: Install node_modules (example/) - run: yarn install --frozen-lockfile --cwd example + - name: Install node_modules + run: yarn install --frozen-lockfile + - name: Install node_modules (example/) + run: yarn install --frozen-lockfile --cwd example - - name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m - run: | - yarn typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run TypeScript # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m + run: | + yarn typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run TypeScript in example/ # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m - run: | - cd example && yarn typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee && cd .. - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run TypeScript in example/ # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m + run: | + cd example && yarn typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee && cd .. + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} lint: name: Lint JS (eslint, prettier) @@ -77,36 +77,36 @@ jobs: run: working-directory: ./package steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Restore node_modules from cache - uses: actions/cache@v4 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Restore node_modules from cache + uses: actions/cache@v4 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - - name: Install node_modules - run: yarn install --frozen-lockfile - - name: Install node_modules (example/) - run: yarn install --frozen-lockfile --cwd example + - name: Install node_modules + run: yarn install --frozen-lockfile + - name: Install node_modules (example/) + run: yarn install --frozen-lockfile --cwd example - - name: Run ESLint - run: yarn lint -f @jamesacarr/github-actions + - name: Run ESLint + run: yarn lint -f @jamesacarr/github-actions - - name: Run ESLint with auto-fix - run: yarn lint --fix + - name: Run ESLint with auto-fix + run: yarn lint --fix - - name: Run ESLint in example/ - run: cd example && yarn lint -f @jamesacarr/github-actions && cd .. + - name: Run ESLint in example/ + run: cd example && yarn lint -f @jamesacarr/github-actions && cd .. - - name: Run ESLint in example/ with auto-fix - run: cd example && yarn lint --fix && cd .. + - name: Run ESLint in example/ with auto-fix + run: cd example && yarn lint --fix && cd .. - - name: Verify no files have changed after auto-fix - run: git diff --exit-code HEAD + - name: Verify no files have changed after auto-fix + run: git diff --exit-code HEAD