Skip to content

Update dependency typescript-eslint to v8.47.0 #3438

Update dependency typescript-eslint to v8.47.0

Update dependency typescript-eslint to v8.47.0 #3438

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request: { }
defaults:
run:
shell: bash
jobs:
build:
if: ${{
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|| (github.event_name == 'push' && !startsWith(github.event.head_commit.message, '[push-back]'))
|| github.event_name != 'push'
}}
concurrency:
group: build-${{github.ref}}
cancel-in-progress: true
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
lfs: true
fetch-depth: 1
- name: Read action's Node.js version
id: read-node-version
run: |
USING=$( yq '.runs.using' ./action.yml )
if ! [[ "$USING" =~ ^node[0-9]+$ ]]; then
echo "::error::action.yml: .runs.using doesn't start with 'node': '$USING'"
exit 1
fi
VERSION=${USING:4}
echo "Action's Node.js version: $VERSION"
echo "result=$VERSION" | tee -a $GITHUB_OUTPUT
- name: Setup Node.js ${{steps.read-node-version.outputs.result}}
uses: actions/setup-node@v6
with:
node-version: '${{steps.read-node-version.outputs.result}}'
- name: Update Node.js version in project files
run: |
node update-node-version-in-files "${{steps.read-node-version.outputs.result}}"
- name: Get package manager
id: package-manager
run: |
PACKAGE_MANAGER=$( yq -r '.packageManager' ./package.json )
PACKAGE_MANAGER=${PACKAGE_MANAGER%%@*}
if ! [[ "$PACKAGE_MANAGER" =~ ^[a-z]+$ ]]; then
echo "::error::package.json: unsupported .packageManager format: '$PACKAGE_MANAGER'"
exit 1
fi
echo "PACKAGE_MANAGER=$PACKAGE_MANAGER" | tee -a $GITHUB_ENV
echo "result=$PACKAGE_MANAGER" | tee -a $GITHUB_OUTPUT
PACKAGE_MANAGER_NAME=${PACKAGE_MANAGER^}
echo "name=$PACKAGE_MANAGER_NAME" | tee -a $GITHUB_OUTPUT
- name: Create cache params
id: cache-params
run: |
echo "key=${{runner.os}}-dependencies-${{steps.read-node-version.outputs.result}}-${{hashFiles('package.json', 'pnpm-*.yml', '.yarnrc.yml', 'yarn.lock' , '.pnp.*', '.yarn/patches/**', '.yarn/plugins/**', '.yarn/releases/**', '.yarn/versions/**')}}" | tee -a $GITHUB_OUTPUT
echo "paths<<EOF" | tee -a $GITHUB_OUTPUT
echo "node_modules" | tee -a $GITHUB_OUTPUT
echo ".yarn/cache" | tee -a $GITHUB_OUTPUT
echo "EOF" | tee -a $GITHUB_OUTPUT
- name: Restore dependencies cache
id: restore-dependencies-cache
uses: actions/cache/restore@v4
with:
key: ${{steps.cache-params.outputs.key}}
path: ${{steps.cache-params.outputs.paths}}
- name: Install dependencies
run: |
if [ "${{steps.package-manager.outputs.result}}" == "pnpm" ]; then
pnpm install --no-frozen-lockfile
elif [ "${{steps.package-manager.outputs.result}}" == "yarn" ]; then
yarn install --no-immutable
else
echo "::error::Unsupported package manager: $PACKAGE_MANAGER"
exit 1
fi
- name: Save dependencies cache
if: ${{steps.restore-dependencies-cache.outputs.cache-hit != 'true'}}
uses: actions/cache/save@v4
with:
key: ${{steps.cache-params.outputs.key}}
path: ${{steps.cache-params.outputs.paths}}
- name: Build
run: |
${{steps.package-manager.outputs.result}} run build
- name: Upload dist to artifacts
if: ${{always()}}
uses: actions/upload-artifact@v5
with:
name: dist
path: dist/
if-no-files-found: error
overwrite: true
retention-days: 30
# $$$sync-with-template-modifiable: validation $$$
- name: Run current action
uses: ./
# $$$sync-with-template-modifiable-end$$$
- name: Push back
env:
PUSH_BACK_TOKEN: ${{secrets.PUSH_BACK_TOKEN}}
if: ${{github.event_name == 'push' && startsWith(github.ref, 'refs/heads/') && env.PUSH_BACK_TOKEN}}
uses: remal-github-actions/push-back@v1
with:
githubToken: ${{env.PUSH_BACK_TOKEN}}
message: '[push-back] Push-back updated files during build'
- name: Read version
id: readVersion
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}
uses: remal-github-actions/read-nodejs-package-version@v1
- name: Create tag
env:
PUSH_BACK_TOKEN: ${{secrets.PUSH_BACK_TOKEN}}
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main' && env.PUSH_BACK_TOKEN}}
uses: remal-github-actions/create-tag@v1
with:
githubToken: ${{env.PUSH_BACK_TOKEN}}
tagName: 'v${{steps.readVersion.outputs.majorVersion}}'
forcePush: 'true'