Skip to content

Update dependency @testing-library/react to v15 #2367

Update dependency @testing-library/react to v15

Update dependency @testing-library/react to v15 #2367

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: react-components-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "npm"
registry-url: "https://npm.pkg.github.com"
scope: "@ofcoursedude"
- run: npm ci
name: Install packages
- run: npm run build --if-present
name: Build
- run: npm test
name: Test
- run: npm run build-storybook
name: Build storybook
- name: Publish
if: ${{ github.ref == 'refs/heads/main' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
MAJOR_MINOR_PACKAGE_VERSION=$(node -e "console.log(require('./package.json').version)" | sed -E "s/^([0-9]+\.[0-9]+)\.[0-9]+/\1/g")
NEW_PACKAGE_VERSION="$MAJOR_MINOR_PACKAGE_VERSION.${{ github.run_number }}"
echo "New package version: $NEW_PACKAGE_VERSION"
npm version $NEW_PACKAGE_VERSION --no-git-tag-version
npm publish
# - name: Delete old package versions
# uses: actions/delete-package-versions@v4
# if: ${{ github.ref == 'refs/heads/main' }}
# env:
# NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
# with:
# min-versions-to-keep: 10
# package-name: react-components