Skip to content

chore(deps): update dependency prettier-plugin-packagejson to v2.5.0 #2250

chore(deps): update dependency prettier-plugin-packagejson to v2.5.0

chore(deps): update dependency prettier-plugin-packagejson to v2.5.0 #2250

Workflow file for this run

name: build
on:
push:
branches:
- main
- 'renovate/**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
env:
GIT_EMAIL: bot+ruby-semver@renovateapp.com
NODE_VERSION: 20 # needs to be in sync with other versions below
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
DRY_RUN: true
permissions:
contents: read
jobs:
test:
name: ${{ matrix.node-version == 20 && format('test ({0})', matrix.os) || format('test ({0}, node-{1})', matrix.os, matrix.node-version) }}
runs-on: ${{ matrix.os }}
# tests shouldn't need more time
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18, 20]
env:
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 20 }}
NODE_VERSION: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
show-progress: false
filter: blob:none # we don't need all blobs
- name: Enable corepack
run: corepack enable
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Init platform
shell: bash
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email ${GIT_EMAIL}
git config --global user.name 'Renovate Bot'
echo "Node $(node --version)"
echo "pnpm $(pnpm --version)"
- name: Installing dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Unit tests
run: pnpm jest --maxWorkers=2 --ci --coverage ${{ env.coverage }} --logHeapUsage
- name: Upload coverage
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
if: always() && env.coverage == 'true'
with:
name: coverage
path: coverage
- name: Codecov
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: env.coverage == 'true'
lint:
runs-on: ubuntu-latest
# lint shouldn't need more than 10 min
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
show-progress: false
filter: blob:none # we don't need all blobs
- name: Enable corepack
run: corepack enable
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Init platform
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email ${GIT_EMAIL}
git config --global user.name 'Renovate Bot'
echo "Node $(node --version)"
echo "pnpm $(pnpm --version)"
- name: Installing dependencies
run: pnpm install
- name: Lint
run: |
pnpm eslint -f gha
pnpm markdown-lint
pnpm prettier
- name: Type check
run: pnpm type-check
release:
needs: [lint, test]
runs-on: ubuntu-latest
# release shouldn't need more than 5 min
timeout-minutes: 15
permissions:
contents: write
id-token: write
steps:
# full checkout for semantic-release
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
show-progress: false
filter: blob:none # we don't need all blobs
- name: Enable corepack
run: corepack enable
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Init platform
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email ${GIT_EMAIL}
git config --global user.name 'Renovate Bot'
- name: Check dry run
run: |
if [[ "${{github.event_name}}" == "workflow_dispatch" && "${{ github.event.inputs.dryRun }}" != "true" ]]; then
echo "DRY_RUN=false" >> $GITHUB_ENV
elif [[ "${{github.ref}}" == "refs/heads/${{env.DEFAULT_BRANCH}}" ]]; then
echo "DRY_RUN=false" >> $GITHUB_ENV
elif [[ "${{github.ref}}" =~ ^refs/heads/v[0-9]+(\.[0-9]+)?$ ]]; then
echo "DRY_RUN=false" >> $GITHUB_ENV
fi
- name: Installing dependencies
run: pnpm install
- name: semantic-release
run: pnpm semantic-release --dry-run ${{github.ref != 'refs/heads/main'}} --ci ${{github.ref == 'refs/heads/main'}}
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}